Created
May 31, 2020 16:48
-
-
Save arnold-parge/b539f67f8fe6845fc74960a598d1dc4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Future<List<UserModel>> getAll() async { | |
var fetchStartTime = DateTime.now().millisecondsSinceEpoch; | |
var rawUsers = await AppSqliteDb.sqliteDb.query(UserModel.tableName); | |
var fetchEndTime = DateTime.now().millisecondsSinceEpoch; | |
appWarning( | |
'Time taken to fetch 1000 users from db: ${fetchEndTime - fetchStartTime}ms'); | |
return rawUsers.map((snap) => UserModel.fromDb(snap)).toList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment