serializeToMapExpression method
Serialize your custom map implementation to a standard Map.
Given mapExpression
, which a String that evaluates to your custom
map implementation T
not that if isMapExpressionNullable
is true, that mapExpression
is
nullable and you need null safe accessors
Example: if your custom map implementation has a method .toMap(),
implement this method like this:
String serializeToMap(String mapExpression, DartType keyType,
DartType valueType, bool isMapExpressionNullable){
final optionalQuestion = isMapExpressionNullable ? '?' : '';
return mapExpression + optionalQuestion + '.toMap()';
}
Implementation
@override
String serializeToMapExpression(String mapExpression, DartType keyType,
DartType valueType, bool isMapExpressionNullable) {
return mapExpression;
/// [ObservableMap] has MapMixin this should be enough?
}