feat: Initialize project
This commit is contained in:
18
lib/ui/views/startup/startup_viewmodel.dart
Normal file
18
lib/ui/views/startup/startup_viewmodel.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:stacked/stacked.dart';
|
||||
import 'package:bahla_front/app/app.locator.dart';
|
||||
import 'package:bahla_front/app/app.router.dart';
|
||||
import 'package:stacked_services/stacked_services.dart';
|
||||
|
||||
class StartupViewModel extends BaseViewModel {
|
||||
final _navigationService = locator<NavigationService>();
|
||||
|
||||
// Place anything here that needs to happen before we get into the application
|
||||
Future runStartupLogic() async {
|
||||
await Future.delayed(const Duration(seconds: 3));
|
||||
|
||||
// This is where you can make decisions on where your app should navigate when
|
||||
// you have custom startup logic
|
||||
|
||||
_navigationService.replaceWithHomeView();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user