diff --git a/lib/utils/auth_util.dart b/lib/utils/auth_util.dart index 808a88c09..77f973204 100644 --- a/lib/utils/auth_util.dart +++ b/lib/utils/auth_util.dart @@ -1,5 +1,5 @@ -import 'package:local_auth/auth_strings.dart'; import 'package:local_auth/local_auth.dart'; +import 'package:local_auth_android/local_auth_android.dart'; import 'package:logging/logging.dart'; Future requestAuthentication(String reason) async { @@ -7,18 +7,20 @@ Future requestAuthentication(String reason) async { await LocalAuthentication().stopAuthentication(); return await LocalAuthentication().authenticate( localizedReason: reason, - androidAuthStrings: const AndroidAuthMessages( - biometricHint: "Verify identity", - biometricNotRecognized: "Not recognized, try again", - biometricRequiredTitle: "Biometric required", - biometricSuccess: "Successfully verified", - cancelButton: "Cancel", - deviceCredentialsRequiredTitle: "Device credentials required", - deviceCredentialsSetupDescription: "Device credentials required", - goToSettingsButton: "Go to settings", - goToSettingsDescription: - "Authentication is not setup on your device, go to Settings > Security to set it up", - signInTitle: "Authentication required", - ), + authMessages: [ + const AndroidAuthMessages( + biometricHint: "Verify identity", + biometricNotRecognized: "Not recognized, try again", + biometricRequiredTitle: "Biometric required", + biometricSuccess: "Successfully verified", + cancelButton: "Cancel", + deviceCredentialsRequiredTitle: "Device credentials required", + deviceCredentialsSetupDescription: "Device credentials required", + goToSettingsButton: "Go to settings", + goToSettingsDescription: + "Authentication is not setup on your device, go to Settings > Security to set it up", + signInTitle: "Authentication required", + ), + ], ); } diff --git a/pubspec.yaml b/pubspec.yaml index 3d6135693..833658db4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.40+40 publish_to: none environment: - sdk: '>=2.17.0 <3.0.0' + sdk: ">=2.17.0 <3.0.0" dependencies: adaptive_theme: ^3.1.0 # done @@ -44,9 +44,9 @@ dependencies: fluttertoast: ^8.1.1 google_nav_bar: ^5.0.5 #supported http: ^0.13.4 - intl: ^0.17.0 + intl: ^0.18.0 json_annotation: ^4.5.0 - local_auth: ^1.1.5 + local_auth: ^2.1.3 logging: ^1.0.1 modal_bottom_sheet: ^3.0.0-pre move_to_background: ^1.0.2 @@ -77,7 +77,6 @@ dev_dependencies: lints: ^1.0.1 mocktail: ^0.3.0 - # The following section is specific to Flutter. flutter: uses-material-design: true