Set<Map<String, dynamic>>' can't be assigned to the parameter type 'Map<String, dynamic> error in Flutter when writing to Firestore
I have a custom user model which has a toMap() function: Map<String, dynamic> toMap() { return { 'uid': uid, 'email': email, 'firstName': firstName, }; } I then use toMap() to write my user data to Firestore (by calling set({customUser.toMap()});): Future<void>…