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 11 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
1 change: 1 addition & 0 deletions packages/local_auth/local_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs a version change.


* Updates minimum Flutter version to 3.0.
* Updates documentation for Android version 8 and below theme compatibility.

## 2.1.3

Expand Down
38 changes: 38 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,44 @@ 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

You need to update the `LaunchTheme` parent style with a valid `Theme.AppCompat`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This shouldn't be phrased to assume it's not already set this way, as it could be. How about:

"Your LaunchTheme's parent must be a valid Theme.AppCompat theme to prevent crashes on Android 8 and below."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, it looks great to me

theme to be compatible with **Android version 8 and below**, otherwise the app
crashes for those versions. For example, use `Theme.AppCompat.DayNight` to
enable light/dark modes for the biometric dialog. 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 to apply the changes made in `styles.xml`).
Then change the parent for that style as follows:

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

If you don't have a `styles.xml` file for your Android project you can set up the Android theme directly in `android/app/src/main/AndroidManifest.xml`:

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

Comment thread
camsim99 marked this conversation as resolved.
## Sticky Auth

You can set the `stickyAuth` option on the plugin to true so that plugin does not
Expand Down