fix: pincode functionality

This commit is contained in:
2026-07-29 22:43:38 +02:00
parent 3cf4787e8c
commit a732e2d07f
8 changed files with 112 additions and 56 deletions
+6 -4
View File
@@ -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';