Skip to content

Commit cc49819

Browse files
committed
fix(web): delay splash screen removal for web platform
- Wrap removeSplashFromWeb() call in WidgetsBinding.instance.addPostFrameCallback - Ensures proper timing for splash screen removal after the app is ready - Improves consistency between web and other platforms
1 parent adff20e commit cc49819

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/main.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ void main() async {
1919

2020
// Only remove the splash screen on web after the app is ready.
2121
if (kIsWeb) {
22-
removeSplashFromWeb();
22+
WidgetsBinding.instance.addPostFrameCallback((_) {
23+
removeSplashFromWeb();
24+
});
2325
}
2426

2527
if (appConfig.environment == AppEnvironment.demo && kIsWeb) {

0 commit comments

Comments
 (0)