mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-24 18:52:55 +03:00
Merge PR #986.
This commit is contained in:
commit
846333e9a1
@ -31,6 +31,7 @@ class AndroidQrScanner implements QrScanner {
|
||||
(context) async => await Navigator.of(context).push(PageRouteBuilder(
|
||||
pageBuilder: (_, __, ___) =>
|
||||
Theme(data: AppTheme.darkTheme, child: const QrScannerView()),
|
||||
settings: const RouteSettings(name: 'android_qr_scanner_view'),
|
||||
transitionDuration: const Duration(seconds: 0),
|
||||
reverseTransitionDuration: const Duration(seconds: 0),
|
||||
)));
|
||||
|
@ -63,6 +63,7 @@ class MainPage extends ConsumerWidget {
|
||||
'user_interaction_prompt',
|
||||
'oath_add_account',
|
||||
'oath_icon_pack_dialog',
|
||||
'android_qr_scanner_view',
|
||||
].contains(route.settings.name);
|
||||
});
|
||||
});
|
||||
|
@ -57,6 +57,8 @@ Widget oathBuildActions(
|
||||
enabled: used != null && (capacity == null || capacity > used),
|
||||
onTap: used != null && (capacity == null || capacity > used)
|
||||
? () async {
|
||||
final credentials = ref.read(credentialsProvider);
|
||||
final withContext = ref.read(withContextProvider);
|
||||
Navigator.of(context).pop();
|
||||
CredentialData? otpauth;
|
||||
if (Platform.isAndroid) {
|
||||
@ -73,13 +75,13 @@ Widget oathBuildActions(
|
||||
}
|
||||
}
|
||||
}
|
||||
await ref.read(withContextProvider)((context) async {
|
||||
await withContext((context) async {
|
||||
await showBlurDialog(
|
||||
context: context,
|
||||
builder: (context) => OathAddAccountPage(
|
||||
devicePath,
|
||||
oathState,
|
||||
credentials: ref.watch(credentialsProvider),
|
||||
credentials: credentials,
|
||||
credentialData: otpauth,
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user