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

/ 156,454评论 / 625572阅读 / 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说道:

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

  2. RickyAlage说道:

    best mail order pharmacy canada Large Selection of Medications from Canada canadian pharmacy tampa

  3. Marcelcrolf说道:

    http://mexicoph24.life/# mexican mail order pharmacies

  4. Michaelsew说道:

    http://canadaph24.pro/# onlinecanadianpharmacy 24

  5. RickyAlage说道:

    indian pharmacy online Generic Medicine India to USA online pharmacy india

  6. Marcelcrolf说道:

    http://indiaph24.store/# pharmacy website india

  7. piper doll TPE対シリコーン:あなたにぴったりのダッチワイフ素材を選んでください

  8. Michaelsew说道:

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

  9. ラブドール 新しくて高品質の人形は、中古の人形にはない、より楽しくて新しい機能も提供できます。 また、ショップで新品のダッチワイフを購入した場合は、その保証を取得するだけで、保証期間内に問題が発生した場合は製品を交換できます。

  10. RickyAlage说道:

    п»їlegitimate online pharmacies india indian pharmacy top 10 online pharmacy in india

  11. StevenSen说道:

    п»їlegitimate online pharmacies india: indian pharmacy – india online pharmacy

  12. StevenSen说道:

    best canadian online pharmacy: canadian pharmacies – canadian pharmacy king reviews

  13. Marcelcrolf说道:

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

  14. Michaelsew说道:

    http://mexicoph24.life/# buying prescription drugs in mexico online

  15. RickyAlage说道:

    mexico drug stores pharmacies mexican pharmacy reputable mexican pharmacies online

  16. Michaelsew说道:

    http://canadaph24.pro/# canadian pharmacies comparison

  17. Marcelcrolf说道:

    http://indiaph24.store/# Online medicine order

  18. StevenSen说道:

    canadadrugpharmacy com: canada drugs online reviews – canadian drug pharmacy

  19. Marcelcrolf说道:

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

  20. Hello, constantly i used to check webpage posts here in the early hours
    in the daylight, for the reason that i love to find out more and more.

  21. RickyAlage说道:

    vipps approved canadian online pharmacy Licensed Canadian Pharmacy best online canadian pharmacy

  22. Michaelsew说道:

    http://canadaph24.pro/# legal to buy prescription drugs from canada

  23. StevenSen说道:

    purple pharmacy mexico price list: mexican mail order pharmacies – buying prescription drugs in mexico online

发表回复

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