showDialog method

void showDialog()

Implementation

void showDialog() {
  Get.dialog(
      Center(
        child: SizedBox(
          width: 650.iX,
          child: Card(
            child: Padding(
              padding:
                  EdgeInsets.symmetric(vertical: 30.0.iY, horizontal: 30.iX),
              child: Column(
                mainAxisSize: MainAxisSize.min,
                children: [
                  Row(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Expanded(
                        child: Text(
                          "Are you sure you want to go back?",
                          style: TextStyle(
                              color: CustomColors().textColor,
                              fontSize: 40.iY),
                        ),
                      ),
                      SizedBox(
                        width: 20.iX,
                      ),
                      InkWell(
                        onTap: () {
                          _cancelDialog();
                        },
                        child: Icon(
                          Icons.close,
                          color: CustomColors().textColor,
                          size: 60.iY,
                        ),
                      )
                    ],
                  ),
                  SizedBox(
                    height: 20.iY,
                  ),
                  ImageProcessor().loadImageFromAssets(
                    resId: "icon/8.png",
                    height: 200.iY,
                  ),
                  SizedBox(
                    height: 20.iY,
                  ),
                  Text(
                    "Once you go back, All the progress of this document upload will be lost and you have to go through the process all over again .",
                    style: TextStyle(
                        fontWeight: FontWeight.w300,
                        color: CustomColors().textColor,
                        fontSize: 30.iY),
                  ),
                  SizedBox(
                    height: 40.iY,
                  ),
                  SizedBox(
                    width: double.infinity,
                    child: TextButton(
                        style: ButtonStyle(
                            padding: MaterialStateProperty.all<EdgeInsets>(
                                EdgeInsets.symmetric(
                                    horizontal: 24.iX, vertical: 24.iY)),
                            foregroundColor:
                                MaterialStateProperty.all<Color>(Colors.red),
                            shape: MaterialStateProperty.all<RoundedRectangleBorder>(
                                RoundedRectangleBorder(
                                    borderRadius: BorderRadius.circular(4.0),
                                    side: BorderSide(
                                        color: CustomColors().textColor)))),
                        onPressed: () {
                          Get.find<AadhaarSdkController>()
                              .failureCallback(803);
                          var webController = Get.find<WebController>();
                          webController.stopSdk();
                        },
                        child: Text("YES, GO BACK",
                            style: TextStyle(
                                color: CustomColors().textColor,
                                fontSize: 36.iY))),
                  ),
                  SizedBox(
                    height: 20.iY,
                  ),
                  SizedBox(
                    width: double.infinity,
                    child: ElevatedButton(
                        style: ButtonStyle(
                            foregroundColor: MaterialStateProperty.all<Color>(
                                Colors.white),
                            backgroundColor: MaterialStateProperty.all<Color>(
                                CustomColors().textColor),
                            shape: MaterialStateProperty.all<
                                    RoundedRectangleBorder>(
                                RoundedRectangleBorder(
                                    borderRadius: BorderRadius.circular(4.0),
                                    side: BorderSide(
                                        color: CustomColors().textColor)))),
                        onPressed: () {
                          _cancelDialog();
                        },
                        child: Text("No",
                            style: TextStyle(
                                color: Colors.white, fontSize: 36.iY))),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
      barrierDismissible: true);
}