Skip to content
Back

listRows result parsing issue

  • 0
  • Databases
  • Flutter
eric34
29 May, 2026, 09:15

I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" : 1, "rows" : [ { "name" : "test", "birthday" : "2025-10-02T00:00:00.000+00:00", "sortIndex" : 70, "$id" : "68e16247802c82f620c9", "$sequence" : "69", "$createdAt" : "2025-10-04T18:07:05.869+00:00", "$updatedAt" : "2025-12-17T11:24:38.708+00:00", "$permissions" : [ "read(user:68baf8704fd58f781548)", "update(user:68baf8704fd58f781548)", "delete(user:68baf8704fd58f781548)" ], "$databaseId" : "xxxx", "$tableId" : "yyyy"
} ] } But the code in "factory Row.fromMap(Map<String, dynamic> map)" expects to find the coluln data in a "data" json entry: return Row( $id: map['id'].toString(), $sequence: map['sequence'].toString(), $tableId: map['tableId'].toString(), $databaseId: map['databaseId'].toString(), $createdAt: map['createdAt'].toString(), $updatedAt: map['updatedAt'].toString(), $permissions: List.from(map['permissions'] ?? []), data: Map<String, dynamic>.from(map["data"] ?? {}), ); What am I doing wrong ?

TL;DR
Issue: Developers are facing a problem while parsing the JSON response from a listRows call in Dart SDK, as the code expects column data to be in a "data" entry while the response JSON structure is different. Solution: To resolve, modify the factory Row.fromMap method to correctly map column data from the response JSON structure without the need for a "data" entry.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more