Updated caching placement
This commit is contained in:
@@ -38,6 +38,8 @@ class _MainMenuViewState extends State<MainMenuView> {
|
||||
gameManager.addListener(_updateView);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
precacheImage(
|
||||
const AssetImage('assets/cabo_counter-logo_rounded.png'), context);
|
||||
await Constants.rateMyApp.init();
|
||||
|
||||
if (Constants.rateMyApp.shouldOpenDialog &&
|
||||
@@ -49,13 +51,6 @@ class _MainMenuViewState extends State<MainMenuView> {
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
precacheImage(
|
||||
const AssetImage('assets/cabo_counter-logo_rounded.png'), context);
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
void _updateView() {
|
||||
if (mounted) setState(() {});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ name: cabo_counter
|
||||
description: "Mobile app for the card game Cabo"
|
||||
publish_to: 'none'
|
||||
|
||||
version: 0.5.4+604
|
||||
version: 0.5.4+605
|
||||
|
||||
environment:
|
||||
sdk: ^3.5.4
|
||||
@@ -31,7 +31,6 @@ dependencies:
|
||||
reorderables: ^0.4.2
|
||||
collection: ^1.18.0
|
||||
confetti: ^0.6.0
|
||||
flutter_cache_manager: ^3.3.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user