save<T extends Model> method
Implementation
@override
Future<void> save<T extends Model>(T model, {QueryPredicate? where}) async {
try {
await _setUpObserveIfNeeded();
var methodChannelSaveInput = <String, dynamic>{
'modelName': model.getInstanceType().modelName(),
if (where != null) 'queryPredicate': where.serializeAsMap(),
'serializedModel': model.toJson(),
};
await _channel.invokeMethod('save', methodChannelSaveInput);
} on PlatformException catch (e) {
throw _deserializeException(e);
}
}