I am facing this error: type 'Null' is not a subtype of type 'int'
- 0
- Self Hosted
- Flutter
- Databases
When attempting to fetch areas from the area collection, the application throws an error: "type 'Null' is not a subtype of type 'int.'" This issue originates in the AreaModel.fromJson constructor, indicating that expected integer fields are receiving null values.
Environment:
Both the SDK and the self-hosted Appwrite server are running on the latest versions.
I encountered the same problem earlier in the day when fetching data from the server, which was resolved by downgrading the Appwrite SDK to version 16.1.0. However, again, this issue has emerged in the functionality related to fetching areas.
Any help would be appreciated!
?
Having the same issue after upgrading to "dart_appwrite: ^16.2.0" seems to be related to missing sequence in json.
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, ); }
Use appwrite: 17.0.1 the $sequence can return null but the 17.0.2 and over doesn't handle it correctly.
@Maryusz Thanks for the reply
im using the dart only package dart_appwrite since its a dart only package.
I have experienced the same problem. Seems to be fixed by downgrading Flutter Appwrite to 17.0.1
Recommended threads
- 500 Internal Error when trying get to my...
When I click on my database row in the Cloud console, the page returns a **500 Internal Error** instead of opening the database dashboard. This completely block...
- Gitlab function automation
Im trying to automate my function deployment using gitlabs ci/cd pipeline. Im currently failing trying to use the appwrite cli to create a new deployment. ```...
- Cannot delete rows, deleted relationship...
I had defined a two-way relationship between 2 tables, then I deleted the relationship column I tried re-creating the column but I started to get errors about t...