【发布时间】:2020-02-28 09:32:11
【问题描述】:
如何检查一个按钮当前是否在颤振中处于活动状态?下面是我要创建的按钮的图像:
[]
【问题讨论】:
-
你可以找到这个例子的完整代码github.com/huextrat/TheGorgeousLogin
标签: android user-interface flutter mobile-development
如何检查一个按钮当前是否在颤振中处于活动状态?下面是我要创建的按钮的图像:
[]
【问题讨论】:
标签: android user-interface flutter mobile-development
Flutter 在 v1.9.1 中添加了切换按钮,它由一组按钮组成,回调返回哪个被选中
您可以查看链接:https://api.flutter.dev/flutter/material/ToggleButtons-class.html
一个小例子
ToggleButtons(
children: <Widget>[
Icon(Icons.add),
Icon(Icons.car),
Icon(Icons.menu),
],
onPressed: (int index) {
//returned the selected index user chose
},
isSelected: isSelected,// which is a List<bool> that to define the selected button
),
【讨论】: