Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/local_auth/local_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.4

* Updates documentation for Android version 8 and below theme compatibility.

## 2.1.3

* Updates minimum Flutter version to 2.10.
Expand Down
31 changes: 31 additions & 0 deletions packages/local_auth/local_auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,37 @@ types (such as face scanning) and you want to support SDKs lower than Q,
_do not_ call `getAvailableBiometrics`. Simply call `authenticate` with `biometricOnly: true`.
This will return an error if there was no hardware available.

#### Android theme

On Android you need to update the `LaunchTheme` parent style with the `Theme.AppCompat.Light` theme to be compatible with **Android version 8 and below**; otherwise the app crashes for those versions. To do that go to `android > app > src > main > res > values > styles.xml` and look for the style with name `LaunchTheme` (Notice that `LaunchTheme` must be referenced in the `AndroidManifest.xml` file). Then, change the parent style with the new value and you should have set up something like this:

```xml
...
<resources>
<style name="LaunchTheme" parent="Theme.AppCompat.Light">
...
</style>
...
</resources>
...
```

In case you don't have a `styles.xml` file for your Android project you can set up the Android theme directly on your `android > app > src > main > AndroidManifest.xml` file:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: If you don't have

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: directly in

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove "your" and "file" at the end; the fact that it's a file in their project is clear from context.


```xml
...
<application
...
<activity
...
android:theme="@style/Theme.AppCompat.Light"
...
>
</activity>
</application>
...
```

## Sticky Auth

You can set the `stickyAuth` option on the plugin to true so that plugin does not
Expand Down
2 changes: 1 addition & 1 deletion packages/local_auth/local_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Android and iOS devices to allow local
authentication via fingerprint, touch ID, face ID, passcode, pin, or pattern.
repository: https://github.com/flutter/plugins/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: 2.1.3
version: 2.1.4

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down