VerificationBloc constructor
VerificationBloc(
- VerificationServiceInterface verficationService
Implementation
VerificationBloc(this.verficationService)
: super(VerificationState.initial()) {
on<VerificationEvent>(
(event, emit) async {
await event.when<FutureOr<void>>(
frontIdImageCaptured: (frontIdImage) =>
_onFrontIdImageCaptured(emit, frontIdImage),
backIdImageCaptured: (backIdImage) =>
_onBackIdImageCaptured(emit, backIdImage),
sideIdImageCaptured: (sideIdImage) =>
_onSideIdImageCaptured(emit, sideIdImage),
faceImageCaptured: (faceImage) =>
_onFaceImageCaptured(emit, faceImage),
faceVideoCaptured: (faceVideo) =>
_onFaceVideoCaptured(emit, faceVideo),
resetStep: () => _onResetStep(emit),
signupPressed: (
email,
firstName,
middleName,
lastName,
phoneNumber,
dobDay,
dobMonth,
dobYear,
address,
idNumber,
expiryDateDay,
expiryDateMonth,
expiryDateYear,
addressJa,
addressEn,
address1Ja,
address2Ja,
address3Ja,
address1En,
address2En,
address3En,
postalCode,
visaStatus,
gender,
ptsDay,
ptsMonth,
ptsYear,
ptlDay,
ptlMonth,
ptlYear,
) =>
_onSignupPressed(
emit,
email,
firstName,
middleName,
lastName,
phoneNumber,
dobDay,
dobMonth,
dobYear,
address,
idNumber,
expiryDateDay,
expiryDateMonth,
expiryDateYear,
addressJa,
addressEn,
address1Ja,
address2Ja,
address3Ja,
address1En,
address2En,
address3En,
postalCode,
visaStatus,
gender,
ptsDay,
ptsMonth,
ptsYear,
ptlDay,
ptlMonth,
ptlYear,
),
verifyId: () => _onVerifyId(
emit,
),
parametersAssigned:
(apiKey, onSuccess, routeContext, formVisible, accessToken) =>
_onparametersAssigned(emit, apiKey, onSuccess, routeContext,
formVisible, accessToken),
assignDocumentAndNationality: (
document,
nationality,
) =>
_onAssignDocumentAndNationality(
emit,
document,
nationality,
),
verifyFace: () => _onVerifyFace(emit),
imageCapturing: () => _onImageCapturing(emit),
livelinesspassed: () => _onLivelinessPassed(emit),
setLanguage: (language) => _onSetLanguage(emit, language),
);
},
);
}