2021-12-02 13:44:17 +03:00
|
|
|
import 'package:flutter/material.dart';
|
2021-11-19 17:05:57 +03:00
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
import '../../management/models.dart';
|
|
|
|
|
|
|
|
part 'models.freezed.dart';
|
|
|
|
part 'models.g.dart';
|
|
|
|
|
|
|
|
enum SubPage { authenticator, yubikey }
|
|
|
|
|
|
|
|
@freezed
|
|
|
|
class DeviceNode with _$DeviceNode {
|
|
|
|
factory DeviceNode(
|
|
|
|
List<String> path,
|
|
|
|
int pid,
|
|
|
|
Transport transport,
|
|
|
|
String name,
|
|
|
|
DeviceInfo info,
|
|
|
|
) = _DeviceNode;
|
|
|
|
|
|
|
|
factory DeviceNode.fromJson(Map<String, dynamic> json) =>
|
|
|
|
_$DeviceNodeFromJson(json);
|
|
|
|
}
|
2021-12-02 13:44:17 +03:00
|
|
|
|
|
|
|
@freezed
|
|
|
|
class MenuAction with _$MenuAction {
|
|
|
|
factory MenuAction(
|
|
|
|
{required String text,
|
|
|
|
required Icon icon,
|
|
|
|
void Function()? action}) = _MenuAction;
|
|
|
|
}
|
2021-12-03 12:27:29 +03:00
|
|
|
|
|
|
|
@freezed
|
|
|
|
class WindowState with _$WindowState {
|
|
|
|
factory WindowState({
|
|
|
|
required bool focused,
|
|
|
|
required bool visible,
|
|
|
|
required bool active,
|
|
|
|
}) = _WindowState;
|
|
|
|
}
|