deserializeFromIterableExpression method
convert the given expression for deserialization.
the expression is Dart code that evaluates to an iterable,
so you need to convert this iterable to your custom type
@param expression
the expression, that evaluates to an Iterable
@param resolvedGenericType
the generic type of the list that will be deserialized
@return A String, which is a Dart expression that evaluates to your custom Iterable type
Example for BuiltList:
@override
String deserializeFromIterableExpression(
String expression, DartType resolvedGenericType) {
return '($expression).toBuiltList()';
}
```
Implementation
@override
String deserializeFromIterableExpression(
String expression, DartType resolvedGenericType) {
return 'ObservableSet<${resolvedGenericType.getDisplayString(withNullability: true)}>.of($expression)';
}