You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to use a raw string for one key because one of the API I'm using (appwrite) is storing the id of a record in the '$id' field.
However, the generated file does not take into account the 'r' before the string and it creates an error and I need to update manually the generated file. I have also tried to escape the $ by adding a \ in front of it but id doesn't not work.
Am I missing something or is there a workaround ?
Thank you
@MappableClass()
class TranslatorModel extends TranslatorEntity with TranslatorModelMappable {
/// Constructs a [TranslatorModel] instance.
TranslatorModel({
@MappableField(key: r'$id') required super.id,
required super.surname,
required super.firstname,
required super.languages,
});
}
I need to use a raw string for one key because one of the API I'm using (appwrite) is storing the id of a record in the '$id' field.
However, the generated file does not take into account the 'r' before the string and it creates an error and I need to update manually the generated file. I have also tried to escape the $ by adding a \ in front of it but id doesn't not work.
Am I missing something or is there a workaround ?
Thank you
From TranslatorModelMapper :
The text was updated successfully, but these errors were encountered: