getUserById method
- int id
Implementation
Future<Map<String, dynamic>?> getUserById(int id) async {
final db = await database;
final results = await db.query('users', where: 'id = ?', whereArgs: [id]);
return results.isNotEmpty ? results.first : null;
}