yubioath-flutter/lib/management/state.dart
2022-05-06 15:40:52 +02:00

25 lines
736 B
Dart
Executable File

import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:yubico_authenticator/management/models.dart';
import '../app/models.dart';
import '../core/state.dart';
final managementStateProvider = StateNotifierProvider.autoDispose
.family<ManagementStateNotifier, AsyncValue<DeviceInfo>, DevicePath>(
(ref, devicePath) => throw UnimplementedError(),
);
abstract class ManagementStateNotifier
extends ApplicationStateNotifier<DeviceInfo> {
Future<void> writeConfig(DeviceConfig config,
{String currentLockCode = '',
String newLockCode = '',
bool reboot = false});
Future<void> setMode({
required int interfaces,
int challengeResponseTimeout = 0,
int? autoEjectTimeout,
});
}