Repository navigation
feat: app lock with biometrics or the device screen lock - #214
Merged
Merged
Conversation
An app lock feature: settings kept as device preferences, an authenticator over local_auth, AppLockBloc that locks a cold start that restores a session and a resume after the chosen time in the background, and the lock screen above the router with Unlock and Sign out. The settings get a Security section, APP_LOCK_REQUIRED forces the lock on, and while it is on the recent-apps preview hides the app. MainActivity becomes a FlutterFragmentActivity, as local_auth needs.
… build leaves the lock to the user
…idden pages, and fail closed on a failed check review#195: a restore that waited behind the preview switch let a signed-in page show; the hidden editor kept the focus and the keyboard; the idle sign-out and the lock screen's sign-out showed the pages before the login page; and a failed device check counted as able.
cevheri
force-pushed
the
feat/195-app-lock
branch
from
October 24, 2026 16:32
b492aa9 to
63575b6
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an app lock: with it on, the app asks for the device's biometrics or screen lock on a cold start that restores a session and after the chosen time in the background (immediately, 1, 5 or 15 minutes), and never while signed out. When the time away also passes the idle period, the idle sign-out wins and no lock shows.
lib/features/app_lock/: device preferences for the switch and timeout, an authenticator overlocal_auth3.0.2 (the Flutter team's plugin, biometrics with the device credential as fallback;local_auth_android2.3.0 andlocal_auth_darwin2.0.5 are pinned directly for the localized prompt texts),AppLockBlocwith a droppable unlock, the lock screen and a Security section in Settings.lib/app/lock/app_lock_gate.dart): pages stay mounted offstage, back does nothing, a screen reader reads only the lock. Sign out uses the existing sign-out.APP_LOCK_REQUIREDforces the lock on; the release pipeline does not set it.setRecentsScreenshotEnabledon Android 13+ through a smallMainActivitychannel, aFLAG_SECURElease while away below 13.MainActivityis now aFlutterFragmentActivity; the launch themes inheritTheme.AppCompat;NSFaceIDUsageDescriptionin English and Turkish.docs/security.mdgains "App lock".Checked on the API 33 emulator (PIN and fingerprint) and API 30 against tool/studio-dev; details in the issue thread on request. The iOS prompt and snapshot are left to #199.
Closes #195