We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下面代码正确预期是点击取消和确定按钮后只是关闭对话框,但是现在会导致当前界面也关闭。
取消
确定
var dialog = YYDialog().build(context) ..width = 250 ..widget( Container( height: 100, padding: EdgeInsets.all(0.0), child: Row( children: <Widget>[ Text('你们还不是好友,只能发送提醒消息!'), ], ), ), ); dialog.doubleButton( padding: EdgeInsets.only(top: 10.0), // gravity: Gravity.center, withDivider: true, text1: "取消", color1: Colors.redAccent, fontSize1: 14.0, fontWeight1: FontWeight.bold, onTap1: () { print("取消"); // Navigator.pop(context); dialog.dismiss(); }, text2: "确定", color2: Colors.redAccent, fontSize2: 14.0, fontWeight2: FontWeight.bold, onTap2: () { print("确定"); dialog.dismiss(); // Navigator.pop(context); }, )..show();
The text was updated successfully, but these errors were encountered:
doubleButton有个默认参数,isClickAutoDismiss = true,点击按钮后自动关闭。你onTap中又调用了 dialog.dismiss(); 相当于连续调用两次,导致界面后退。
Sorry, something went wrong.
fix in v1.0.1
No branches or pull requests
下面代码正确预期是点击
取消
和确定
按钮后只是关闭对话框,但是现在会导致当前界面也关闭。The text was updated successfully, but these errors were encountered: