toJson method
Returns data as an encodable object compatible with json.encode().
For data arrays the type of the returned value is Iterable<Object?>, and
for data objects Map<String, Object?>.
Implementation
@override
Map<String, Object?> toJson() => map;