popDialog static method

void popDialog(
  1. bool needForceUpdate,
  2. String buildVersionNo,
  3. String buildVersion,
  4. String buildUpdateDescription,
  5. String buildName,
  6. String? buildFileSize,
  7. String downloadURL,
  8. String package_name,
  9. BuildContext context,
)

Implementation

static void popDialog(
    bool needForceUpdate,
    String buildVersionNo,
    String buildVersion,
    String buildUpdateDescription,
    String buildName,
    String? buildFileSize,
    String downloadURL,
    String package_name,
    BuildContext context,
    ) {
  showDialog(
      context: context,
      barrierDismissible: false,
      builder: (_) {
        return WillPopScope(
            child: TPUpdteWidget(
              needForceUpdate: needForceUpdate,
              buildVersionNo: buildVersionNo,
              buildVersion: buildVersion,
              buildUpdateDescription: buildUpdateDescription,
              buildName: buildName,
              buildFileSize: (
                  (
                      (double.parse(
                          (buildFileSize)!
                      ))
                  /
                      (1024*1024)
              ).toStringAsFixed(2)),
              url: downloadURL,
              packageName: package_name,
              width: MediaQuery.of(context).size.width*0.7,
              onClose: ()=>_close(context),
            ),
            onWillPop: () async{
              return false;
            });
      });

}