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

/ 140,025评论 / 460171阅读 / 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. The guarantee covers the quality of workmanship of the
    product. The top therapeutic massage chair brands utilize
    better quality components. Of course, it willl
    allow new porees and skin cells to grow round your physique
    and enable you to achieve higher and clearer pores and skin buildings.
    One can fiknd that Madsage Chairs provide you with large convenience when getting frequent therapeutic massage remedies.
    Backk on Earth, there is an efficient collection oof zero gravity therapeutic massage chairs to select from.

    Dont fear, therapeutic massage chairs ccan assist to cut back your stress and
    get you again to fcusing on your routine. Get your health back in steadiness and combine massage therapy into
    your total well being routine. Just remember that
    a massage chair will be an asset to yor well being program.

    Massage must be part of a traditional health program.
    The trickier part is to look at potential future needs. Another necessary area is to think about your future needs.

    Also visit mmy homepage :: דירה דיסקרטית ברמת גן

  2. Elmernem说道:

    dark web search engines dark website

回复 Kaapbiady 取消回复

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