Actually return something from the getStats function...
This commit is contained in:
parent
05d541335c
commit
3a25d17c94
1 changed files with 2 additions and 1 deletions
|
@ -125,7 +125,7 @@ class PracticeDatabase {
|
|||
}
|
||||
|
||||
// TODO test the database
|
||||
static Future<Map<String, dynamic>> getStats() async {
|
||||
static Future<Map<String, double>> getStats() async {
|
||||
var db = await getDatabase();
|
||||
List<Map<String, dynamic>> answers = await db.rawQuery('''
|
||||
SELECT
|
||||
|
@ -165,6 +165,7 @@ class PracticeDatabase {
|
|||
stats[typeRange] = stat['ratio'] as double;
|
||||
}
|
||||
print(stats);
|
||||
return stats;
|
||||
}
|
||||
|
||||
static Map<String, double> getEmtpyStats(){
|
||||
|
|
Loading…
Add table
Reference in a new issue