deleteHitWithId method

Future<void> deleteHitWithId(
  1. String id,
  2. String nameTable
)

Implementation

Future<void> deleteHitWithId(String id, String nameTable) async {
  // Get a reference to the database.
  final db = _hitDatabase;
  // Remove the Dog from the database.
  await db?.delete(
    '$nameTable',
    // Use a `where` clause to delete a specific dog.
    where: 'id = ?',
    // Pass the hit's id as a whereArg to prevent SQL injection.
    whereArgs: [id],
  );
}