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
- Not getting data
IDK what the issue is but I am stuck at a weried but that I am calling this function ``` @override Future<List<CategoryModel>> getCategories() async { t...
- Problem with the new Email policies
when user set those thing from cloud panel and when they open that page again or reload that time it forget what we have checked and it set default to false on ...
- Deleted my account, trying to signup aga...
https://cloud.appwrite.io/console/login?error=%7B%22message%22%3A%22This+email+address+must+already+be+in+its+canonical+form.+Please+remove+aliases%2C+tags%2C+o...