fix: pincode functionality
This commit is contained in:
+6
-4
@@ -21,10 +21,12 @@ GoRouter createAppRouter(PinLockViewModel pinLockViewModel) {
|
||||
redirect: (context, state) {
|
||||
if (!pinLockViewModel.hasLoaded) return null;
|
||||
|
||||
final needsSetup = !pinLockViewModel.isPinSet;
|
||||
final isLocked =
|
||||
pinLockViewModel.isPinSet && !pinLockViewModel.isUnlocked;
|
||||
final mustBeOnLock = needsSetup || isLocked;
|
||||
final needsPinSetup =
|
||||
!pinLockViewModel.isPinSet && pinLockViewModel.pinRequired;
|
||||
final isLocked = pinLockViewModel.isPinSet &&
|
||||
!pinLockViewModel.isUnlocked &&
|
||||
pinLockViewModel.pinRequired;
|
||||
final mustBeOnLock = needsPinSetup || isLocked;
|
||||
|
||||
final goingToLock = state.matchedLocation == '/lock';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user