【发布时间】:2019-01-23 11:36:00
【问题描述】:
我有一个基于 ontapdown 和 ontapup 的工作循环进度按钮,但是我希望它在进度完成后触发。现在它只有在进度完成并且用户点击时才会触发。
onTapDown: (_) {
controller1.forward();
},
onTapUp: (_) {
if (controller1.status ==
AnimationStatus.forward) {
controller1.reverse();
} else if (controller1.status ==
AnimationStatus.completed) {
setState(() {
controller1.value = 0.0;
// widget.isClickCALLBOMBA = true;
// controller1.reverse();
Flushbar()
..title = allTranslations
.text('success')
..message =
"We will alert the bomba !"
..duration =
Duration(seconds: 3)
..backgroundColor =
Colors.red
..show(context);
});
}
},
【问题讨论】: