did_change_authlocal 1.0.1
did_change_authlocal: ^1.0.1 copied to clipboard
A Flutter plugin to detect biometric data changes (Face ID, Touch ID, Fingerprint). Protects against unauthorized biometric enrollment.
1.0.1 #
- Update example Android to declarative Gradle plugins (AGP 8.7.0, Gradle 8.9)
- Replace
FlutterLifecycleAdapterwithProcessLifecycleOwner(standard AndroidX API)
1.0.0 #
Breaking Changes #
- Dart SDK: Minimum SDK bumped to
>=3.0.0 <4.0.0(Dart 3 with sound null safety) - Flutter: Minimum Flutter version bumped to
>=3.10.0 - Android: Minimum SDK bumped to API 23 (Android 6.0)
- iOS: Minimum deployment target bumped to iOS 12.0
- Internal platform-specific methods are now private (
_checkBiometricIOS,_checkBiometricAndroid)
New Features #
onBiometricChangedstream ⭐ — Real-time biometric monitoring via nativeEventChannelon both iOS and Android. No Dart-side polling or lifecycle hacks needed.- Android: Uses Kotlin Coroutines
StateFlow+DefaultLifecycleObserver.onResume+ periodic polling fallback (5s) - iOS: Uses
NotificationCenter.willEnterForegroundNotification+LAContext.evaluatedPolicyDomainStatetoken comparison - Both platforms implement
distinctUntilChangednatively — Dart only receives events when status actually changes
- Android: Uses Kotlin Coroutines
- Swift Package Manager support (Issue #9) — Added
Package.swiftfor SPM compatibility, migrating the iOS plugin to Pure Swift Architecture and resolving module conflicts. - Android face recognition note (Issue #7) — Clarified that Android KeyStore invalidation natively detects Face Recognition changes only if the device manufacturer implements it as a Class 3 (Strong) biometric (e.g. Pixel 4).
- Persistent AuthLocalStatus binding (Feature Request) — The
AuthLocalStatus.changedstate now stays bound (locked) across app restarts until explicitly released by calling the newacknowledgeChange()API. - iOS
checkmethod — iOS now supports the samecheckMethodChannel call as Android, enabling consistent cross-platform one-shot checks - iOS
BiometricStreamHandler— Full nativeFlutterStreamHandlerimplementation with lifecycle observation, baseline token tracking, and automatic cleanup
Bug Fixes #
- Fixed Android plugin running unreachable code after
result.success()/result.error() - Fixed iOS
authenticateBiometricusing deprecatedbase64EncodedData()instead ofbase64EncodedString() - Fixed example app missing
dispose()forWidgetsBindingObserver(memory leak) - Fixed example app typo
HomwPage→HomePage
Improvements #
- Platform-agnostic Dart code: Both iOS and Android now emit through the same
EventChannelwith identical status strings — the Dart layer is completely platform-agnostic - No more WidgetsBindingObserver: All lifecycle monitoring is handled natively (Kotlin + Swift), eliminating Dart-side workarounds
- Added comprehensive dartdoc comments throughout the API
- Added
@visibleForTestingannotation formethodChannelandeventChannel - Used Dart 3 switch expressions instead of switch statements
- Used typed
invokeMethod<String>calls for type safety - Upgraded Android Kotlin from 1.6.10 → 1.9.22
- Upgraded Android Gradle Plugin from 4.1.0 → 7.4.2
- Upgraded Android compileSdk from 31 → 34
- Upgraded Android Java target from 1.8 → 17
- Added Kotlin Coroutines 1.7.3 and AndroidX Lifecycle 2.7.0 dependencies
- Added
namespaceinbuild.gradle(required by AGP 7+) - Removed deprecated
packageattribute fromAndroidManifest.xml - Upgraded
flutter_lintsto v5
0.0.6 #
- Update README.md
0.0.5 #
- Update README.md
0.0.4 #
- Update README.md
0.0.3 #
- Update README.md
0.0.2 #
- Update example and refactor
0.0.1 #
- Initial release