queryById method
Get a specific row by ID
Implementation
Future<Map<String, dynamic>?> queryById(String tableName, int id) async {
final db = await database;
final results = await db.query(
tableName,
where: 'id = ?',
whereArgs: [id],
);
return results.isNotEmpty ? results.first : null;
}