Back

Error: type 'List<dynamic>' is not a subtype of type 'List<String>'

  • 0
  • Databases
  • Flutter
  • Cloud
-N I N J A-
20 Dec, 2024, 07:02

Getting Error: type 'List<dynamic>' is not a subtype of type 'List<String>'

void storeAppDeviceData() async { try { await appwriteDatabases.createDocument( databaseId: DATABASE_ID, collectionId: APP_DEVICE_DATA_COLLECTION_ID, documentId: ID.unique(), data: {'token': 'XYZ'}, ); } catch (e) { print('Error: $e'); } }

TL;DR
Error message: type 'List<dynamic>' is not a subtype of type 'List<String>'; The issue is likely due to trying to assign a List<dynamic> to a List<String>. Check data types being used in the code. Temporary reference provided.
Darshan Pandya
20 Dec, 2024, 07:35

Refer this in the meantime.

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