mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 10:11:52 +03:00
reduce flicker on Accounts and Fingerprints screen
This commit is contained in:
parent
1d178a78c6
commit
43d69a6025
@ -54,6 +54,8 @@ class FingerprintsScreen extends ConsumerWidget {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
return ref.watch(fidoStateProvider(deviceData.node.path)).when(
|
||||
loading: () => AppPage(
|
||||
title: l10n.s_fingerprints,
|
||||
capabilities: const [Capability.fido2],
|
||||
centered: true,
|
||||
delayedContent: true,
|
||||
builder: (context, _) => const CircularProgressIndicator(),
|
||||
@ -344,6 +346,8 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
}
|
||||
|
||||
Widget _buildLoadingPage(BuildContext context) => AppPage(
|
||||
title: AppLocalizations.of(context)!.s_fingerprints,
|
||||
capabilities: const [Capability.fido2],
|
||||
centered: true,
|
||||
delayedContent: true,
|
||||
builder: (context, _) => const CircularProgressIndicator(),
|
||||
|
@ -263,7 +263,7 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
|
||||
final data = ref.watch(credentialProvider(widget.node.path)).asData;
|
||||
if (data == null) {
|
||||
return _buildLoadingPage(l10n, context);
|
||||
return _buildLoadingPage(context);
|
||||
}
|
||||
final credentials = data.value;
|
||||
final filteredCredentials =
|
||||
@ -502,9 +502,8 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildLoadingPage(AppLocalizations l10n, BuildContext context) =>
|
||||
AppPage(
|
||||
title: l10n.s_passkeys,
|
||||
Widget _buildLoadingPage(BuildContext context) => AppPage(
|
||||
title: AppLocalizations.of(context)!.s_passkeys,
|
||||
capabilities: const [Capability.fido2],
|
||||
centered: true,
|
||||
delayedContent: true,
|
||||
|
@ -204,6 +204,8 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
|
||||
|
||||
if (numCreds == null) {
|
||||
return AppPage(
|
||||
title: AppLocalizations.of(context)!.s_accounts,
|
||||
capabilities: const [Capability.oath],
|
||||
centered: true,
|
||||
delayedContent: true,
|
||||
builder: (context, _) => const CircularProgressIndicator(),
|
||||
|
Loading…
Reference in New Issue
Block a user