navigate function

dynamic navigate(
  1. BuildContext context,
  2. int scanItem,
  3. DocumentType? type
)

Implementation

navigate(BuildContext context, int scanItem, DocumentType? type) {
 // print('scanItem=${scanItem}');
  ///   IDCARD:  1,
/// FACEVERIFY: 2,
/// LIVELINESS: 3
  switch (scanItem) {
    case 1:
      //goTo(context, IdCardPage(docType: type,) );

     //goTo(context, const LiveFlow(),);
     //goTo(context,const  SubmitScanLoading(),);
     //goTo(context, const ShowSuccess(scanId: '', msg: ''),);
       /// this hided
       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:
    // goTo(
    //   context,
    //   const FaceVerifyCam(
    //       //inCountry: widget.skipCountry,
    //       //token: widget.token,
    //       // frontFile: widget.frontFile,
    //       //backFile: widget.backFile,
    //       //came: widget.came,
    //       //size: MediaQuery.of(context).size,
    //       /// includeOtp: true,
    //       ),
    // );

    //  break;
    case 3:

      goTo(context, const LiveFlow(),);
     // goTo(context, const FaceVerifyCam(),);
      // submitData()
      //  goTo(context,const IdCardPage() );
      break;
  }
  // if (scanItem == 1 && code == "AADHAAR") {
  //
  // } else if (scanItem == 1 && code == "PAN") {}
}