add delay and change empty games message
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m11s
Pull Request Pipeline / lint (pull_request) Successful in 2m11s

This commit is contained in:
2025-12-05 20:33:27 +01:00
parent f5842f9c4a
commit 7323f52153

View File

@@ -46,11 +46,10 @@ class _GameHistoryViewState extends State<GameHistoryView> {
void initState() { void initState() {
super.initState(); super.initState();
db = Provider.of<AppDatabase>(context, listen: false); db = Provider.of<AppDatabase>(context, listen: false);
_gameListFuture = db.gameDao.getAllGames(); _gameListFuture = Future.delayed(
const Duration(milliseconds: 250),
Future.wait([_gameListFuture]).then((result) async { () => db.gameDao.getAllGames(),
await Future.delayed(const Duration(milliseconds: 250)); );
});
} }
@override @override
@@ -78,8 +77,8 @@ class _GameHistoryViewState extends State<GameHistoryView> {
return const Center( return const Center(
child: TopCenteredMessage( child: TopCenteredMessage(
icon: Icons.report, icon: Icons.report,
title: 'Error', title: 'Info',
message: 'No Games Available', message: 'No games created yet.',
), ),
); );
} }