Im trying to read all the fields inside my uid1 and uid2 document from firestore. My code crashes because fromJson cant convert imageList from array to List.
Future<List<AppClient>> getClientListResult(List<String> listId) async{
final List<AppClient> clientList = <AppClient>[];
print(listId);
final QuerySnapshot<Map<String, dynamic>> snapshot = await _firestore.collection('clients').where('uid', arrayContainsAny: listId).get();
final List<AppClient> result = snapshot.docs.map((QueryDocumentSnapshot<Map<String, dynamic>> doc) => AppClient.fromJson(doc.data())).toList();
clientList.addAll(result);
return clientList;
}
