【发布时间】:2020-09-09 02:04:35
【问题描述】:
是否存在可以与常规按钮或任何 onclick 事件一起使用的快速拨号小部件?我发现this 小部件与FloatingActionButton 配合得很好,但我需要一些可以与IconButton 或RaisedButton 配合使用的东西。我尝试在容器内使用 SpeedDial 小部件,如下所示:
Container(
child: SpeedDial(
overlayOpacity: 0.2,
animatedIcon: AnimatedIcons.menu_close,
children: [
SpeedDialChild(
child: Icon(Icons.ac_unit),
label: 'Second',
onTap: () => print('SECOND'),
),
SpeedDialChild(
child: Icon(Icons.accessibility),
backgroundColor: Colors.red,
label: 'First',
labelStyle: TextStyle(fontSize: 18.0),
onTap: () => print('FIRST'),
),
],
),
),
但不幸的是,没有运气。我在右边得到一个无穷大的像素。
【问题讨论】: