mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-26 03:32:39 +03:00
24 lines
780 B
Dart
Executable File
24 lines
780 B
Dart
Executable File
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import '../../app/models.dart';
|
|
import '../../app/views/app_failure_screen.dart';
|
|
import '../../app/views/app_loading_screen.dart';
|
|
import '../state.dart';
|
|
|
|
class FidoScreen extends ConsumerWidget {
|
|
final YubiKeyData deviceData;
|
|
const FidoScreen(this.deviceData, {Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) =>
|
|
ref.watch(fidoStateProvider(deviceData.node.path)).when(
|
|
none: () => const AppLoadingScreen(),
|
|
failure: (reason) => AppFailureScreen(reason),
|
|
success: (state) => ListView(
|
|
children: [
|
|
Text('${state.info}'),
|
|
],
|
|
));
|
|
}
|