[flutter/Getx]解决Get.back()会优先关闭Get.snackbar而不是页面的问题

/ 156,516评论 / 625849阅读 / 0点赞

Get.snackbar

问题

navigator!.pop();
navigator!.pop<T>(result);
class MyRoute_c {
  static void back<T>({T? result}) {
    navigator!.pop<T>(result);
  }
}

Getx其他悬浮组件调整

正如上面所描述的问题一样,在Getx的其他悬浮组件中同样有类似的问题。

下面我们以 Get.defaultDialog() 示例问题并解决

Get.defaultDialog(
    title: "弹窗标题",
    textConfirm: "确认", // 确认按钮的文本
    textCancel: "取消", // 取消按钮的文本
    onConfirm:() {
        print("确认按钮被按下");
        Get.back();
    }
);
onConfirm: (null != onConfirm)
            ? onConfirm
            : () {
                MyRoute_c.back();
              },
onCancel: (null != onCancel)
            ? onCancel
            : () {
                if (Get.isSnackbarOpen) {
                  MyRoute_c.back();
                }
              }
  1. RickyAlage说道:

    п»їbest mexican online pharmacies mexico pharmacy mexican online pharmacies prescription drugs

  2. Marcelcrolf说道:

    https://mexicoph24.life/# medication from mexico pharmacy

  3. StevenSen说道:

    mexico drug stores pharmacies: mexico pharmacy – best online pharmacies in mexico

  4. Marcelcrolf说道:

    https://indiaph24.store/# buy prescription drugs from india

  5. RickyAlage说道:

    mexican rx online Mexican Pharmacy Online mexico drug stores pharmacies

  6. Marcelcrolf说道:

    https://indiaph24.store/# top 10 pharmacies in india

  7. Michaelsew说道:

    http://canadaph24.pro/# canada pharmacy world

  8. Marcelcrolf说道:

    http://indiaph24.store/# buy medicines online in india

  9. RickyAlage说道:

    mexican border pharmacies shipping to usa mexican pharmacy purple pharmacy mexico price list

  10. Michaelsew说道:

    http://mexicoph24.life/# mexico drug stores pharmacies

  11. StevenSen说道:

    top 10 online pharmacy in india: buy medicines from India – online pharmacy india

  12. Marcelcrolf说道:

    http://mexicoph24.life/# best online pharmacies in mexico

  13. RickyAlage说道:

    top 10 online pharmacy in india buy medicines from India top 10 pharmacies in india

  14. StevenSen说道:

    mexican rx online: cheapest mexico drugs – reputable mexican pharmacies online

  15. Marcelcrolf说道:

    http://mexicoph24.life/# medication from mexico pharmacy

  16. Michaelsew说道:

    http://indiaph24.store/# online shopping pharmacy india

  17. RickyAlage说道:

    mexico pharmacies prescription drugs mexican pharmacy buying prescription drugs in mexico online

  18. JustinTut说道:

    top 10 online pharmacy in india https://indiaph24.store/# top 10 pharmacies in india
    buy prescription drugs from india

  19. Michaelsew说道:

    https://canadaph24.pro/# online canadian pharmacy

  20. RickyAlage说道:

    top 10 pharmacies in india indian pharmacy reputable indian online pharmacy

  21. JustinTut说道:

    top online pharmacy india http://indiaph24.store/# mail order pharmacy india
    best online pharmacy india

  22. Marcelcrolf说道:

    https://canadaph24.pro/# pharmacies in canada that ship to the us

  23. JustinTut说道:

    indian pharmacy online http://indiaph24.store/# online pharmacy india
    top online pharmacy india

  24. StevenSen说道:

    onlinecanadianpharmacy 24: Prescription Drugs from Canada – canadian pharmacy ratings

  25. RickyAlage说道:

    pharmacy website india buy medicines from India online shopping pharmacy india

  26. Marcelcrolf说道:

    http://canadaph24.pro/# best canadian pharmacy to order from

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注