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

/ 156,493评论 / 625711阅读 / 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. Marcelcrolf说道:

    https://indiaph24.store/# reputable indian online pharmacy

  2. RickyAlage说道:

    pharmacies in mexico that ship to usa mexican pharmacy medication from mexico pharmacy

  3. Marcelcrolf说道:

    http://canadaph24.pro/# canadianpharmacymeds com

  4. Michaelsew说道:

    http://canadaph24.pro/# safe canadian pharmacy

  5. Thank you great posting about essential oil. Hello Administ . Seo Paketi Skype: By_uMuT@KRaLBenim.Com -_- live:by_umut

  6. After all, what a great site and informative posts, I will upload inbound link – bookmark this web site? Regards, Reader.Seo Paketi Skype: By_uMuT@KRaLBenim.Com -_- live:by_umut

  7. StevenSen说道:

    ed meds online canada: Prescription Drugs from Canada – canadian 24 hour pharmacy

  8. RickyAlage说道:

    mexican pharmacy Mexican Pharmacy Online medication from mexico pharmacy

  9. Marcelcrolf说道:

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

  10. Michaelsew说道:

    https://canadaph24.pro/# canadian pharmacy phone number

  11. StevenSen说道:

    medicine in mexico pharmacies: purple pharmacy mexico price list – pharmacies in mexico that ship to usa

  12. Marcelcrolf说道:

    http://indiaph24.store/# india pharmacy mail order

  13. RickyAlage说道:

    buy prescription drugs from india buy medicines from India online shopping pharmacy india

  14. Marcelcrolf说道:

    https://canadaph24.pro/# precription drugs from canada

  15. RickyAlage说道:

    purple pharmacy mexico price list mexican pharmacy mexican online pharmacies prescription drugs

  16. Michaelsew说道:

    https://mexicoph24.life/# reputable mexican pharmacies online

  17. Marcelcrolf说道:

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

  18. RickyAlage说道:

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

  19. Marcelcrolf说道:

    https://mexicoph24.life/# mexican online pharmacies prescription drugs

  20. Michaelsew说道:

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

  21. RickyAlage说道:

    mexican border pharmacies shipping to usa Online Pharmacies in Mexico reputable mexican pharmacies online

  22. Can I simply just say what a relief to uncover somebody that truly knows what they’re discussing over the internet.
    You actually know how to bring a problem to light and make it
    important. More people have to read this and understand this side of
    your story. I was surprised that you aren’t more popular because
    you certainly possess the gift.

发表回复

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