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

/ 156,370评论 / 625112阅读 / 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://canadaph24.pro/# best canadian online pharmacy reviews

  2. Michaelsew说道:

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

  3. RickyAlage说道:

    reliable canadian online pharmacy canadian pharmacies pet meds without vet prescription canada

  4. Marcelcrolf说道:

    http://mexicoph24.life/# buying from online mexican pharmacy

  5. RickyAlage说道:

    best india pharmacy Generic Medicine India to USA indian pharmacy paypal

  6. StevenSen说道:

    india pharmacy mail order: indian pharmacy – buy prescription drugs from india

  7. Michaelsew说道:

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

  8. Marcelcrolf说道:

    http://mexicoph24.life/# mexican drugstore online

  9. RickyAlage说道:

    canadianpharmacymeds com canadian pharmacies best canadian pharmacy online

  10. Everyone loves what you guys tend to be up too. Such clever work
    and exposure! Keep up the very good works guys I’ve
    added you guys to blogroll.

  11. StevenSen说道:

    cheapest online pharmacy india: indian pharmacy fast delivery – buy prescription drugs from india

  12. Michaelsew说道:

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

  13. Marcelcrolf说道:

    http://canadaph24.pro/# buying from canadian pharmacies

  14. RickyAlage说道:

    india pharmacy mail order indian pharmacy fast delivery indian pharmacy paypal

  15. Michaelsew说道:

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

  16. RickyAlage说道:

    best online pharmacy india buy medicines from India world pharmacy india

  17. StevenSen说道:

    canadian valley pharmacy: Prescription Drugs from Canada – medication canadian pharmacy

  18. Michaelsew说道:

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

  19. StevenSen说道:

    mexican pharmaceuticals online: Mexican Pharmacy Online – mexican online pharmacies prescription drugs

  20. Marcelcrolf说道:

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

  21. RickyAlage说道:

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

  22. Michaelsew说道:

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

  23. Marcelcrolf说道:

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

  24. Michaelsew说道:

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

发表回复

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