此动画效果是我在浏览文章时发现的一个非常酷炫的效果,于是就使用 Flutter 实现了。...和未激活(关)状态的颜色:
WheelSwitch(
value: false,
width: 150,
height: 50,
activeTrackColor: Colors.red...,
inactiveTrackColor: Colors.green,
)
设置滑块的颜色:
WheelSwitch(
value: false,
width: 150,
height...:
激活状态(开):
设置文字和文字样式:
WheelSwitch(
value: false,
width: 150,
height: 50,
activeText: '开',
inactiveText...: '关',
activeTextStyle: TextStyle(color: Colors.white,fontSize: 20),
inactiveTextStyle: TextStyle