yubioath-flutter/lib/management/state.dart

25 lines
736 B
Dart
Raw Normal View History

2022-03-04 15:42:10 +03:00
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:yubico_authenticator/management/models.dart';
import '../app/models.dart';
2022-03-09 19:47:50 +03:00
import '../core/state.dart';
2022-03-04 15:42:10 +03:00
final managementStateProvider = StateNotifierProvider.autoDispose
.family<ManagementStateNotifier, AsyncValue<DeviceInfo>, DevicePath>(
2022-03-04 15:42:10 +03:00
(ref, devicePath) => throw UnimplementedError(),
);
2022-03-09 19:47:50 +03:00
abstract class ManagementStateNotifier
extends ApplicationStateNotifier<DeviceInfo> {
2022-03-04 15:42:10 +03:00
Future<void> writeConfig(DeviceConfig config,
{String currentLockCode = '',
String newLockCode = '',
bool reboot = false});
2022-05-05 13:40:56 +03:00
Future<void> setMode({
required int interfaces,
int challengeResponseTimeout = 0,
int? autoEjectTimeout,
});
2022-03-04 15:42:10 +03:00
}