You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.0 KiB
Dart

part of 'fingerprint_bloc.dart';
abstract class FingerprintEvent extends Equatable {
const FingerprintEvent();
@override
List<Object?> get props => [];
}
/// Dispatched on app startup to trigger the background login / token-fetch.
class AppStarted extends FingerprintEvent {
const AppStarted();
}
/// Dropdown: document type changed
class DocumentTypeChanged extends FingerprintEvent {
final DocumentType documentType;
const DocumentTypeChanged(this.documentType);
@override
List<Object?> get props => [documentType];
}
/// Dropdown: finger selection changed.
/// [fingerIndex] is the numeric key from [fingerIndexMap].
class FingerTypeChanged extends FingerprintEvent {
final int fingerIndex;
const FingerTypeChanged(this.fingerIndex);
@override
List<Object?> get props => [fingerIndex];
}
/// Text field: national ID changed
class NationalIdChanged extends FingerprintEvent {
final String value;
const NationalIdChanged(this.value);
@override
List<Object?> get props => [value];
}
/// Text field: nationality changed (passport mode)
class NationalityChanged extends FingerprintEvent {
final String value;
const NationalityChanged(this.value);
@override
List<Object?> get props => [value];
}
/// Text field: passport number changed
class PassportNumberChanged extends FingerprintEvent {
final String value;
const PassportNumberChanged(this.value);
@override
List<Object?> get props => [value];
}
/// Connect to the device
class ConnectDevice extends FingerprintEvent {
const ConnectDevice();
}
/// Trigger a fingerprint scan
class ScanFingerprintEvent extends FingerprintEvent {
const ScanFingerprintEvent();
}
/// Reset form to initial state
class ResetBlocEvent extends FingerprintEvent {
const ResetBlocEvent();
}
/// Send captured fingerprint data
class SendFingerprintEvent extends FingerprintEvent {
const SendFingerprintEvent();
}
/// Verify the captured fingerprint against stored records
class VerifyFingerprintEvent extends FingerprintEvent {
const VerifyFingerprintEvent();
}