serialize method Null safety

  1. @override
Map<String, dynamic> serialize()
override

Implementation

@override
Map<String, dynamic> serialize() {
  return fields.map((key, value) {
    return MapEntry(key, value?.serialize());
  });
}