delete method

Future<int> delete ({@required String table, String where, List<String> whereArgs })

Convenience method for deleting rows in the database.

See: https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase#delete(java.lang.String,%20java.lang.String,%20java.lang.String[])

Implementation

Future<int> delete({
  @required final String table,
  final String where,
  final List<String> whereArgs,
}) async {
  final Map<String, dynamic> request = <String, dynamic>{
    'id': id,
    'table': table,
    'whereClause': where, // note the name mapping
    'whereArgs': whereArgs,
  };
  return await _channel.invokeMethod('delete', request);
}