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