2021-03-19 13:27:39 +00:00
|
|
|
import 'package:local_auth/local_auth.dart';
|
2021-03-21 08:32:10 +00:00
|
|
|
import 'package:logging/logging.dart';
|
2021-03-19 13:27:39 +00:00
|
|
|
|
2021-11-27 06:19:05 +00:00
|
|
|
Future<bool> requestAuthentication(String reason) async {
|
2021-03-21 08:32:10 +00:00
|
|
|
Logger("AuthUtil").info("Requesting authentication");
|
2021-08-04 16:10:34 +00:00
|
|
|
await LocalAuthentication().stopAuthentication();
|
2021-03-19 13:27:39 +00:00
|
|
|
return await LocalAuthentication().authenticate(
|
2021-11-27 05:45:42 +00:00
|
|
|
localizedReason: reason,
|
2021-08-04 16:10:34 +00:00
|
|
|
);
|
2021-03-19 13:27:39 +00:00
|
|
|
}
|