Skip to content

local_auth_android-v1.0.23

@stuartmorgan stuartmorgan tagged this 18 Apr 18:02
Updates the platform communication to use Pigeon. This includes some changes to the API boundary:
- Collected authentication options into an options object; this avoids having a lot of positional boolean arguments (since Pigeon doesn't currently support named arguments).
- Collected strings into a strings object, since having them as individual parameters would have been extremely messy.
- Changes the `authenticate` return from a bool+exceptions to an enum that encompasses all of the explicitly known failure modes. To avoid a breaking change for clients, the Dart code creates `PlatformException`s that match the old ones, but this will make it much easier to someday make a (cross-platform) breaking change to replace them with better errors per the best practices we have documented on the wiki. Using an enum rather than throwing errors avoids the need to do string matching when we want to eventually translate them into something other than `PlatformException`.

This removes all Java warnings from the baseline file; the remaining issues in code I wasn't already changing were easy enough to fix opportunistically. There are still XML-based warnings, but fixing those was well out of scope so I left them.

Part of https://github.com/flutter/flutter/issues/117912
Assets 2
Loading