您可以分配一个回调,为每个按钮调用不同的方法
new FlatButton(
child: new Text(confirmText),
onPressed: () => onOkPressed(),
),
Run Code Online (Sandbox Code Playgroud)
或者你可以传递一个参数
new FlatButton(
child: new Text(confirmText),
onPressed: () => onButtonPressed('okButton'),
),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2427 次 |
| 最近记录: |