Skip to content

使用useSystem = true时,onDismiss不会回调 #283

@SpannerBear

Description

@SpannerBear

版本信息

  • Flutter版本:3.19.4
  • flutter_smart_dialog版本:4.9.8+9

描述bug/需求

1.主要问题:使用useSystem = true,调用Navigator.poponDismiss不会回调;
2.我想要返回键调用Navigator.pop的时候关闭弹窗,试了一下只有useSystem = true 的时候正确响应关闭,想问下是不是只有useSystem = true 才可以用pop关闭弹窗?

demo

  static _show(BuildContext context){
    SmartDialog.show(
      alignment: Alignment.center,
      useSystem: true,
      onDismiss: () {
        XLog.d("laile", "xiaolaodi");
      },
      builder: (BuildContext _) {
        return Container(
            width: 500,
            height: 300,
            decoration: BoxDecoration(
              color: Colors.white,
              borderRadius: BorderRadius.circular(20),
            ),
            child: Center(
                child: ElevatedButton(
                    onPressed: () => Navigator.pop(context),
                    child: const Text('pop')
                )
            )
        );
      },
    );
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions