Resolve package version conflict and fix error (#132)

This commit is contained in:
Neeraj Gupta 2023-06-02 10:34:41 +05:30 committed by GitHub
commit 840bf8d8eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 18 deletions

View file

@ -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<bool> requestAuthentication(String reason) async {
@ -7,18 +7,20 @@ Future<bool> 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",
),
],
);
}

View file

@ -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