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

/ 156,523评论 / 625886阅读 / 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. vo_ntorg_ciSn说道:

    Воєнторг
    11. Качественные кобуры и чехлы для оружия
    літні тактичні черевики https://voentorgklyp.kiev.ua/vzuttya/cherevyky/ .

  2. StevenSen说道:

    purple pharmacy mexico price list: Mexican Pharmacy Online – buying prescription drugs in mexico online

  3. RickyAlage说道:

    purple pharmacy mexico price list Online Pharmacies in Mexico mexican mail order pharmacies

  4. razumgo说道:

    психология москва https://w-495.ru/

  5. RickyAlage说道:

    п»їlegitimate online pharmacies india indian pharmacy fast delivery pharmacy website india

  6. razumgo说道:

    психолог в москве консультациЯ цена https://w-495.ru/

  7. JustinTut说道:

    Online medicine order http://indiaph24.store/# top online pharmacy india
    indian pharmacies safe

  8. RickyAlage说道:

    buy medicines online in india cheapest online pharmacy india indian pharmacy online

  9. Michaelsew说道:

    http://canadaph24.pro/# certified canadian international pharmacy

  10. Pedropaite说道:

    medication from mexico pharmacy: buying from online mexican pharmacy – mexican rx online

  11. Pedropaite说道:

    mexican mail order pharmacies: п»їbest mexican online pharmacies – mexican border pharmacies shipping to usa

  12. StevenSen说道:

    mexico drug stores pharmacies: mexican pharmacy – pharmacies in mexico that ship to usa

  13. Michaelsew说道:

    https://mexicoph24.life/# mexican border pharmacies shipping to usa

  14. Marcelcrolf说道:

    http://canadaph24.pro/# best canadian online pharmacy

  15. result hk 6d说道:

    Very nice article, just what I was looking for.

  16. psylolo说道:

    москва психолог вакансии https://w-495.ru/

  17. mozggogo说道:

    психолог частнаЯ практика https://w-495.ru/

  18. vizghert说道:

    психолог яндекс https://w-495.ru/

  19. razumdodo说道:

    психолог профи https://w-495.ru/

  20. RickyAlage说道:

    indian pharmacy Generic Medicine India to USA indianpharmacy com

  21. psyxgogo说道:

    поиск психологов https://w-495.ru/

  22. razumi说道:

    психологи в москве цены https://w-495.ru/

  23. Marcelcrolf说道:

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

  24. psydodo说道:

    сервис по подбору психологов https://w-495.ru/

  25. Michaelsew说道:

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

  26. RickyAlage说道:

    canada drug pharmacy canadian pharmacies my canadian pharmacy rx

  27. Marcelcrolf说道:

    https://mexicoph24.life/# purple pharmacy mexico price list

  28. StevenSen说道:

    canada pharmacy world: Licensed Canadian Pharmacy – thecanadianpharmacy

  29. Michaelsew说道:

    https://indiaph24.store/# reputable indian pharmacies

发表回复

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