mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
revert fido credential provider changes
This commit is contained in:
parent
4490547e2d
commit
8349135aee
@ -180,7 +180,7 @@ class _FidoFingerprintsNotifier extends FidoFingerprintsNotifier {
|
||||
}
|
||||
|
||||
final androidCredentialProvider = AsyncNotifierProvider.autoDispose
|
||||
.family<FidoCredentialsNotifier, List<FidoCredential>?, DevicePath>(
|
||||
.family<FidoCredentialsNotifier, List<FidoCredential>, DevicePath>(
|
||||
_FidoCredentialsNotifier.new);
|
||||
|
||||
class _FidoCredentialsNotifier extends FidoCredentialsNotifier {
|
||||
@ -188,7 +188,7 @@ class _FidoCredentialsNotifier extends FidoCredentialsNotifier {
|
||||
late StreamSubscription _sub;
|
||||
|
||||
@override
|
||||
FutureOr<List<FidoCredential>?> build(DevicePath devicePath) async {
|
||||
FutureOr<List<FidoCredential>> build(DevicePath devicePath) async {
|
||||
_sub = _events.receiveBroadcastStream().listen((event) {
|
||||
final json = jsonDecode(event);
|
||||
if (json == null) {
|
||||
@ -203,7 +203,7 @@ class _FidoCredentialsNotifier extends FidoCredentialsNotifier {
|
||||
});
|
||||
|
||||
ref.onDispose(_sub.cancel);
|
||||
return Completer<List<FidoCredential>?>().future;
|
||||
return Completer<List<FidoCredential>>().future;
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -269,7 +269,7 @@ class _DesktopFidoFingerprintsNotifier extends FidoFingerprintsNotifier {
|
||||
}
|
||||
|
||||
final desktopCredentialProvider = AsyncNotifierProvider.autoDispose
|
||||
.family<FidoCredentialsNotifier, List<FidoCredential>?, DevicePath>(
|
||||
.family<FidoCredentialsNotifier, List<FidoCredential>, DevicePath>(
|
||||
_DesktopFidoCredentialsNotifier.new);
|
||||
|
||||
class _DesktopFidoCredentialsNotifier extends FidoCredentialsNotifier {
|
||||
|
@ -44,11 +44,11 @@ abstract class FidoFingerprintsNotifier
|
||||
}
|
||||
|
||||
final credentialProvider = AsyncNotifierProvider.autoDispose
|
||||
.family<FidoCredentialsNotifier, List<FidoCredential>?, DevicePath>(
|
||||
.family<FidoCredentialsNotifier, List<FidoCredential>, DevicePath>(
|
||||
() => throw UnimplementedError(),
|
||||
);
|
||||
|
||||
abstract class FidoCredentialsNotifier
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<FidoCredential>?, DevicePath> {
|
||||
extends AutoDisposeFamilyAsyncNotifier<List<FidoCredential>, DevicePath> {
|
||||
Future<void> deleteCredential(FidoCredential credential);
|
||||
}
|
||||
|
@ -237,10 +237,6 @@ class _FidoUnlockedPageState extends ConsumerState<_FidoUnlockedPage> {
|
||||
}
|
||||
final credentials = data.value;
|
||||
|
||||
if (credentials == null) {
|
||||
return _buildLoadingPage(context);
|
||||
}
|
||||
|
||||
if (credentials.isEmpty) {
|
||||
return MessagePage(
|
||||
title: l10n.s_passkeys,
|
||||
|
Loading…
Reference in New Issue
Block a user