toDatastoreValue method
Converts value
according to the Property named name
in type
.
Implementation
@override
Object? toDatastoreValue(String kind, String fieldName, Object? value,
{bool forComparison = false}) {
var modelDescription = _kind2ModelDesc[kind];
if (modelDescription == null) {
throw ArgumentError('The kind "$kind" is unknown.');
}
return modelDescription.encodeField(this, fieldName, value,
forComparison: forComparison);
}