From 9941bacad1d9574b090b527ea305d85e017d52c9 Mon Sep 17 00:00:00 2001 From: anirudhsharma Date: Mon, 15 Jun 2026 13:25:36 +0530 Subject: [PATCH] Clarify getAvailableBiometrics documentation regarding iOS permissions --- packages/local_auth/local_auth/CHANGELOG.md | 3 ++- packages/local_auth/local_auth/lib/src/local_auth.dart | 8 +++++++- packages/local_auth/local_auth/pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/local_auth/local_auth/CHANGELOG.md b/packages/local_auth/local_auth/CHANGELOG.md index 71ca732c88a5..f9a8a5a7785e 100644 --- a/packages/local_auth/local_auth/CHANGELOG.md +++ b/packages/local_auth/local_auth/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 3.0.2 +* Clarifies the `getAvailableBiometrics` documentation regarding iOS permission requirements. * Updates minimum supported SDK version to Flutter 3.38/Dart 3.10. ## 3.0.1 diff --git a/packages/local_auth/local_auth/lib/src/local_auth.dart b/packages/local_auth/local_auth/lib/src/local_auth.dart index ba641e7d2141..a76b659fa1e5 100644 --- a/packages/local_auth/local_auth/lib/src/local_auth.dart +++ b/packages/local_auth/local_auth/lib/src/local_auth.dart @@ -88,7 +88,13 @@ class LocalAuthentication { /// fail over to device credentials. Future isDeviceSupported() async => LocalAuthPlatform.instance.isDeviceSupported(); - /// Returns a list of enrolled biometrics. + /// Returns a list of the biometrics that the app can currently use for + /// authentication. + /// + /// Note that this may not include all biometrics enrolled on the device. + /// For example, on iOS, biometrics may be enrolled on the device but + /// remain unavailable to the app if the user has not granted the required + /// permissions to use them. Future> getAvailableBiometrics() => LocalAuthPlatform.instance.getEnrolledBiometrics(); } diff --git a/packages/local_auth/local_auth/pubspec.yaml b/packages/local_auth/local_auth/pubspec.yaml index 39133f332c04..bf35d018e959 100644 --- a/packages/local_auth/local_auth/pubspec.yaml +++ b/packages/local_auth/local_auth/pubspec.yaml @@ -2,7 +2,7 @@ name: local_auth description: Flutter plugin to allow local authentication via biometrics, passcode, pin, or pattern. repository: https://github.com/flutter/packages/tree/main/packages/local_auth/local_auth issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22 -version: 3.0.1 +version: 3.0.2 environment: sdk: ^3.10.0