我想在Flutter中为特定的图标实现下拉列表,并在AppBar中对其应用GestureDetector。它的代码是,>
AppBar(
actions: <Widget>[
Padding(
padding: const EdgeInsets.fromLTRB(4.0, 4.0, 0, 4.0),
child: Image.network(
"Some Image Url"),
),
GestureDetector(
onTap: () {
// I want to implement the Dropdown List here.
},
child: Padding(
padding: const EdgeInsets.all(0.0),
child: Icon(Icons.arrow_drop_down),
),
),
],
)
我想在Flutter中为特定的图标实现下拉列表,并在AppBar中对其应用GestureDetector。它的代码是AppBar(操作:
我想Popup Menu Button可能就是您想要的。