我知道我可以在Flutter中的AppBar的操作中使用IconButton。但是,我希望用户看到“保存”或“返回”或“取消”一词,而不是图标,然后在AppBar中单击它们。我该如何实现?这是显示AppBar的代码的一部分。我想使用“保存”代替“保存”图标
return Scaffold(
appBar: AppBar(
leading: IconButton(icon: Icon(Icons.arrow_back),
tooltip: "Cancel and Return to List",
onPressed: () {
Navigator.pop(context, true);
},
),
automaticallyImplyLeading: false,
title: Text(title),
actions: <Widget>[
IconButton(
icon: Icon(Icons.save),
tooltip: "Save Todo and Retrun to List",
onPressed: () {
save();
},
)
],
),//AppBar
Run Code Online (Sandbox Code Playgroud)