When I create a document everything works fine. But when I load a model, then I get the following error: "type String is not a sub type of int" which totaly make sense. But in the lib the code is like the following:
/// Document automatically incrementing ID. final int $sequence;
factory Document.fromMap(Map<String, dynamic> map) { return Document( $id: map['id'].toString(), $sequence: map['sequence'], $collectionId: map['collectionId'].toString(), $databaseId: map['databaseId'].toString(), $createdAt: map['createdAt'].toString(), $updatedAt: map['updatedAt'].toString(), $permissions: List.from(map['permissions'] ?? []), data: map, );
and is receives map['sequence'], as "1" for example. So it is a String and is cannot converted to an in on the fromMap method.
Recommended threads
- Migration and Function glitch
I am trying to migrate from non pro appwrite project to pro appwrite project all my data but it's stuck in processing.
- Unable to signup to appwrite cloud
When attempting to create an online cloud account on appwrite.io, I get the following message : "This email address must already be in its canonical form. Pleas...
- Email address must be in its canonical f...
Hello, Recently I was trying to signup with my GitHub account with appwrite account for availing the student benifits but while trying to signup I saw such erro...