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

/ 142,855评论 / 479922阅读 / 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. Davidfrify说道:

    buy cytotec over the counter buy cytotec over the counter buy cytotec

  2. Davidfrify说道:

    order lisinopril online united states lisinopril 25 mg generic prinivil

  3. Davidfrify说道:

    ciprofloxacin generic ciprofloxacin generic price buy cipro cheap

  4. RandallGuesE说道:

    buy cipro online canada: buy cipro cheap – buy cipro

  5. WilliamRen说道:

    https://lisinopril.network/# zestril 20 mg price in india

  6. WilliamRen说道:

    http://finasteride.store/# get cheap propecia pill

  7. RonaldSwobe说道:

    https://nolvadex.life/# tamoxifen endometrium

  8. RandallGuesE说道:

    tamoxifen cyp2d6: hysterectomy after breast cancer tamoxifen – tamoxifen buy

  9. RandallGuesE说道:

    cytotec pills online: cytotec buy online usa – buy cytotec in usa

  10. WilliamRen说道:

    https://nolvadex.life/# nolvadex online

  11. WilliamRen说道:

    https://ciprofloxacin.tech/# ciprofloxacin over the counter

  12. RandallGuesE说道:

    cipro for sale: buy generic ciprofloxacin – ciprofloxacin generic price

  13. Davidfrify说道:

    clomid nolvadex tamoxifen adverse effects nolvadex steroids

  14. Davidfrify说道:

    get propecia no prescription get propecia without rx buying cheap propecia no prescription

  15. Davidfrify说道:

    tamoxifen rash pictures how to lose weight on tamoxifen buy nolvadex online

  16. Davidfrify说道:

    cipro ciprofloxacin cipro ciprofloxacin cipro online no prescription in the usa

  17. RonaldSwobe说道:

    https://nolvadex.life/# nolvadex pills

  18. RandallGuesE说道:

    lisinopril brand name canada: lisinopril cost uk – lisinopril 10 mg for sale without prescription

  19. WilliamRen说道:

    https://nolvadex.life/# tamoxifen 20 mg tablet

  20. w-495.ru说道:

    психолог недорого москва w-495.ru

  21. RonaldSwobe说道:

    https://cytotec.club/# buy cytotec

  22. RonaldSwobe说道:

    http://lisinopril.network/# lisinopril 20 tablet

  23. RandallGuesE说道:

    Misoprostol 200 mg buy online: buy cytotec in usa – cytotec abortion pill

  24. RandallGuesE说道:

    cytotec pills online: buy cytotec pills – cytotec abortion pill

  25. WilliamRen说道:

    http://cytotec.club/# Abortion pills online

  26. WilliamRen说道:

    https://nolvadex.life/# tamoxifen endometriosis

  27. WilliamRen说道:

    http://lisinopril.network/# lisinopril 40 mg generic

  28. Davidfrify说道:

    buy cytotec in usa п»їcytotec pills online buy cytotec pills

  29. RandallGuesE说道:

    nolvadex steroids: tamoxifen hot flashes – benefits of tamoxifen

  30. Davidfrify说道:

    buy generic ciprofloxacin buy generic ciprofloxacin buy cipro

  31. Davidfrify说道:

    buy cipro online without prescription ciprofloxacin mail online buy cipro cheap

  32. Обучение игре в казино

    олимп казино

  33. RonaldSwobe说道:

    https://finasteride.store/# order cheap propecia without dr prescription

  34. Davidfrify说道:

    tamoxifen premenopausal tamoxifen buy does tamoxifen cause joint pain

  35. Секреты выигрыша в казино
    скачать олимбет

  36. singapore best说道:

    I was able to find good info from your content.

发表回复

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