2 Commits

Author SHA1 Message Date
26fadf5093 add artificial delay to loadPlayerList for skeleton loading
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m8s
Pull Request Pipeline / lint (pull_request) Successful in 2m9s
2025-11-23 15:22:59 +01:00
9e8bab1a60 add artificial delay to group list loading 2025-11-23 15:21:40 +01:00
2 changed files with 9 additions and 2 deletions

View File

@@ -54,7 +54,11 @@ class _CreateGroupViewState extends State<CreateGroupView> {
}
void loadPlayerList() {
_allPlayersFuture = db.playerDao.getAllPlayers();
_allPlayersFuture = Future.delayed(
const Duration(milliseconds: 400),
() => db.playerDao.getAllPlayers(),
);
suggestedPlayers = skeletonData;
_allPlayersFuture.then((loadedPlayers) {
setState(() {
loadedPlayers.sort((a, b) => a.name.compareTo(b.name));

View File

@@ -34,7 +34,10 @@ class _GroupsViewState extends State<GroupsView> {
void initState() {
super.initState();
db = Provider.of<AppDatabase>(context, listen: false);
_allGroupsFuture = db.groupDao.getAllGroups();
_allGroupsFuture = Future.delayed(
const Duration(milliseconds: 400),
() => db.groupDao.getAllGroups(),
);
}
@override