getItem method Null safety
Gets an item from the database table
with id
indicated
Implementation
Future<Map<String, dynamic>?> getItem(String table, String id) async {
await ensureDbOpen();
final result = await db.query(table, where: 'id = ?', whereArgs: [id]);
return result.isNotEmpty ? result.first : null;
}