update
This commit is contained in:
@@ -21,8 +21,10 @@ class SyncPage extends StatefulWidget implements AutoRouteWrapper {
|
||||
State<SyncPage> createState() => _SyncPageState();
|
||||
|
||||
@override
|
||||
Widget wrappedRoute(BuildContext context) =>
|
||||
BlocProvider(create: (context) => getIt<SyncBloc>(), child: this);
|
||||
Widget wrappedRoute(BuildContext context) => BlocProvider(
|
||||
create: (context) => getIt<SyncBloc>()..add(SyncEvent.startSync()),
|
||||
child: this,
|
||||
);
|
||||
}
|
||||
|
||||
class _SyncPageState extends State<SyncPage> with TickerProviderStateMixin {
|
||||
@@ -63,9 +65,9 @@ class _SyncPageState extends State<SyncPage> with TickerProviderStateMixin {
|
||||
_animationController.animateTo(1.0);
|
||||
|
||||
// Tunggu sebentar lalu pindah ke dashboard
|
||||
// Future.delayed(const Duration(seconds: 2), () {
|
||||
// context.pushReplacement(DashboardPage());
|
||||
// });
|
||||
Future.delayed(const Duration(seconds: 2), () {
|
||||
context.router.replace(MainRoute());
|
||||
});
|
||||
}
|
||||
// Kalau error
|
||||
else if (state.errorMessage != null) {
|
||||
|
||||
Reference in New Issue
Block a user