navigate function
dynamic
navigate(
IDCARD: 1, FACEVERIFY: 2, LIVELINESS: 3
Implementation
navigate(BuildContext context, int scanItem, DocumentType? type) {
switch (scanItem) {
case 1:
if (type != null) {
goTo(
context,
ChooseMethod(
documentCode: type.code!,
isBackRequired: type.isBackRequired!,
includeListDoc: false,
includeCountry: false,
documentId: type.sId!,
documentName: type.name!,
countryId: '',
countryName: '',
));
} else {
goTo(
context,
ChooseDoc(
countryValue: passedCountry,
));
}
break;
// case 2:
// break;
case 3:
goTo(
context,
const LiveFlow(),
);
break;
}
}