Skip to content
Back

Type String is not a subtype of type int, Flutter Appwrite

  • 0
  • Flutter
showmore
16 Oct, 2025, 14:07

In flutter using appwrite: ^17.1.0, DocumentList response = await databases!.listDocuments( databaseId: "xxx", collectionId: "xxx", queries: [ Query.equal("uid", uid), Query.limit(1) ], ); why this happing any solution ?

TL;DR
Issue: Error message stating "Type String is not a subtype of type int" in a Flutter app using Appwrite 17.1.0. Solution: Modify the Query.limit(1) line in the code to explicitly pass an integer value instead of a String. For example, Query.limit(1) should be updated to Query.limit(1.toInt()).
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