I just have one issue left and I can’t find an answer anywhere.
——— problem code ——— snapshot.data has a red line
The argument type 'Object? Function()' can't be assigned to the parameter type 'Map<String, dynamic>'.
Record.fromMap(Map<String, dynamic> map, {required this.reference})
: assert(map['firstname'] != null),
assert(map['accountid'] != null),
firstname = map['firstname'].toLowerCase(),
accountid = map['accountid'];
Record.fromSnapshot(DocumentSnapshot snapshot)
: this.fromMap(snapshot.data, reference: snapshot.reference);
I’m looking for links or sample code.
PS- this code worked before null safety
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/0d5b34e1-7061-47b2-bc47-d01423fb3d11n%40googlegroups.com.