find method

Future find(
  1. int id
)

Implementation

Future find(int id) async {
  Database db = await database;

  List<Map<String, Object?>> result =
      await db.rawQuery("SELECT * FROM $table WHERE id = $id");

  if (result.isEmpty) return null;

  return fromMap(result.first);
}