delete method
Delete data from the database
Implementation
@override
Future<int> delete(
String table, {
String? where,
List<dynamic>? whereArgs,
}) async {
final result = await methodChannel.invokeMethod('delete', {
'table': table,
'where': where,
'whereArgs': whereArgs,
});
// Handle both int and long types that might come from Android
if (result is int) {
return result;
} else if (result is num) {
return result.toInt();
}
return 0;
}