delete method
Delete a record by ID
Implementation
Future<int> delete(int id) async {
try {
final db = await database;
return await db.delete(
table,
where: 'id = ?',
whereArgs: [id],
);
} catch (e) {
throw DatabaseException('Failed to delete record with ID $id: $e');
}
}