skip to Main Content

Firebase – Flutter: type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>' in type cast

Im trying to make a list ti json for firestore, and have the following code: static Map<String, dynamic> toJson(Message? message) => { 'id': message?.id, 'senderId': message?.senderId, 'receiverId': message?.receiverId, 'message': message?.message, 'dateTime': message?.dateTime, 'timeString': message?.timeString, 'likes': message?.likes, 'chatId': message?.chatId, 'commentCount': message?.commentCount,…

VIEW QUESTION
Back To Top
Search