Fix blank screen before first load
This commit is contained in:
parent
aacb33fa0b
commit
fd003b0100
4 changed files with 7 additions and 3 deletions
|
|
@ -42,7 +42,6 @@ void main() async {
|
|||
debugPrint('APP INSTALLED!');
|
||||
});
|
||||
final GoRouter appRouter = MihGoRouter().mihRouter;
|
||||
FlutterNativeSplash.remove();
|
||||
runApp(MzansiInnovationHub(
|
||||
router: appRouter,
|
||||
));
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ void main() async {
|
|||
debugPrint('APP INSTALLED!');
|
||||
});
|
||||
final GoRouter appRouter = MihGoRouter().mihRouter;
|
||||
FlutterNativeSplash.remove();
|
||||
runApp(MzansiInnovationHub(
|
||||
(MzansiInnovationHub(
|
||||
router: appRouter,
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_packages/mih_file_viewer/components/mih_print_prevew.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
|
||||
|
|
@ -85,6 +86,7 @@ class MihGoRouter {
|
|||
];
|
||||
KenLogger.success(
|
||||
"Redirect Check: ${state.fullPath}, isUserSignedIn: $isUserSignedIn");
|
||||
FlutterNativeSplash.remove();
|
||||
if (!isUserSignedIn && !unauthenticatedPaths.contains(state.fullPath)) {
|
||||
return MihGoRouterPaths.mihAuthentication;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue