step 15 : fix route navigator, not fixed
This commit is contained in:
@@ -153,13 +153,14 @@ class HomeScreen extends HookConsumerWidget {
|
|||||||
} else if (next is CheckDistanceStateDone) {
|
} else if (next is CheckDistanceStateDone) {
|
||||||
isLoadingProsesCheckDistance.value = false;
|
isLoadingProsesCheckDistance.value = false;
|
||||||
|
|
||||||
if (varCurrentDistanceProvider?.selfie == "TRUE") {
|
if (next.model.selfie == "TRUE") {
|
||||||
ref.read(currentPageProvider.notifier).update((state) => -1);
|
ref.read(currentPageProvider.notifier).update((state) => 99);
|
||||||
Navigator.of(context).pushNamed(presensiSelfieRoute);
|
// Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).restorablePushNamed(presensiSelfieRoute);
|
||||||
} else {
|
} else {
|
||||||
if (varCurrentDistanceProvider?.selfie == "FALSE") {
|
if (next.model.selfie == "FALSE") {
|
||||||
ref.read(currentPageProvider.notifier).update((state) => -1);
|
ref.read(currentPageProvider.notifier).update((state) => 99);
|
||||||
Navigator.of(context).pushNamed(presensiRoute);
|
Navigator.of(context).restorablePushNamed(presensiRoute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,7 +198,7 @@ class HomeScreen extends HookConsumerWidget {
|
|||||||
)
|
)
|
||||||
: FloatingActionButton(
|
: FloatingActionButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
requestLocationPermission();
|
await requestLocationPermission();
|
||||||
},
|
},
|
||||||
backgroundColor: Color(0xFFFFFFFF),
|
backgroundColor: Color(0xFFFFFFFF),
|
||||||
shape: CircleBorder(),
|
shape: CircleBorder(),
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class CustomDrawer extends HookConsumerWidget {
|
|||||||
// Handle navigation to Home screen
|
// Handle navigation to Home screen
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
ref.read(currentPageProvider.state).update((state) => 0);
|
ref.read(currentPageProvider.state).update((state) => 0);
|
||||||
Navigator.pushNamed(context, homeRoute);
|
Navigator.of(context).popAndPushNamed(homeRoute);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ class CustomDrawer extends HookConsumerWidget {
|
|||||||
alignment: Alignment.bottomRight,
|
alignment: Alignment.bottomRight,
|
||||||
child: Text(
|
child: Text(
|
||||||
'Versi ${Constant.version}',
|
'Versi ${Constant.version}',
|
||||||
style: Constant.titleH1_700(context: context)
|
style: Constant.logintitle_700(context: context)
|
||||||
.copyWith(color: Constant.textLightGrey),
|
.copyWith(color: Constant.textLightGrey),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user