mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 12:22:52 +03:00
20 lines
443 B
Dart
Executable File
20 lines
443 B
Dart
Executable File
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'models.freezed.dart';
|
|
part 'models.g.dart';
|
|
|
|
@freezed
|
|
class FidoState with _$FidoState {
|
|
const FidoState._();
|
|
|
|
factory FidoState({
|
|
required Map<String, dynamic> info,
|
|
required bool locked,
|
|
}) = _FidoState;
|
|
|
|
factory FidoState.fromJson(Map<String, dynamic> json) =>
|
|
_$FidoStateFromJson(json);
|
|
|
|
bool get hasPin => info['options']['clientPin'] == true;
|
|
}
|