app perfect
This commit is contained in:
@@ -101,4 +101,12 @@ class PokedexDatabase {
|
||||
int count = result.isNotEmpty ? (result.first.values.first as int? ?? 0) : 0;
|
||||
return count;
|
||||
}
|
||||
|
||||
// Obtenir le nombre de pokémon vus
|
||||
static Future<int> getSeenCount() async {
|
||||
Database database = await getDatabase();
|
||||
var result = await database.rawQuery("SELECT COUNT(*) FROM pokemon WHERE isSeen = 1");
|
||||
int count = result.isNotEmpty ? (result.first.values.first as int? ?? 0) : 0;
|
||||
return count;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user