更新时间:2023-11-12 09:55:16
由于您没有将其直接绑定到onPressed事件,因此需要调用该函数.试试这个:
Since you are not binding it directly to the onPressed event, you need to call the function. Try this:
new FlatButton(
onPressed: () {
btnSi == null ? Navigator.of(context).pop(true):btnSi();
},
child: new Text("Si"),
)