serialize method Null safety
override
Serializes common fields to JSON.
Methods that override serialize are expected to call super.serialize
and add more fields to the returned Map.
Implementation
@override
Map<String, String> serialize() => super.serialize()..addAll(<String, String>{
'type': type,
});