mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
39 lines
955 B
Dart
Executable File
39 lines
955 B
Dart
Executable File
import 'package:flutter/material.dart';
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
import '../../management/models.dart';
|
|
|
|
part 'models.freezed.dart';
|
|
|
|
enum SubPage { authenticator, yubikey }
|
|
|
|
@freezed
|
|
class YubiKeyData with _$YubiKeyData {
|
|
factory YubiKeyData(DeviceNode node, String name, DeviceInfo info) =
|
|
_YubiKeyData;
|
|
}
|
|
|
|
@freezed
|
|
class DeviceNode with _$DeviceNode {
|
|
factory DeviceNode.usbYubiKey(
|
|
List<String> path, String name, int pid, DeviceInfo info) =
|
|
UsbYubiKeyNode;
|
|
factory DeviceNode.nfcReader(List<String> path, String name) = NfcReaderNode;
|
|
}
|
|
|
|
@freezed
|
|
class MenuAction with _$MenuAction {
|
|
factory MenuAction(
|
|
{required String text,
|
|
required Icon icon,
|
|
void Function()? action}) = _MenuAction;
|
|
}
|
|
|
|
@freezed
|
|
class WindowState with _$WindowState {
|
|
factory WindowState({
|
|
required bool focused,
|
|
required bool visible,
|
|
required bool active,
|
|
}) = _WindowState;
|
|
}
|