我该如何在Flutter上取消对CupertinoTimerPicker的关注?

时间:2020-09-08 17:17:54

标签: flutter dart

如何在颤振时不关注CupertinoTimerPicker?

CupertinoTimerPicker(
              mode: CupertinoTimerPickerMode.hm,
              minuteInterval: 1,
              secondInterval: 1,
              initialTimerDuration: _timer,
              onTimerDurationChanged: (Duration changedtimer) {
                // if the duration is set to zero or not set, set to No Countdown button
                if (changedtimer.inSeconds <= 0) {
                  setState(() {
                    _countdownType = CountdownType.DontSet;
                    _currentSelectedLabel = _buttonValueList[0];
                    _timer = Duration.zero;
                  });
                } else {
                  setState(() { 
                    _countdownType = CountdownType.Set;
                    _currentSelectedLabel = _buttonValueList[1];
                    _timer = changedtimer;
                  });
                }

                _onPressed(changedtimer);
              },
            ),

0 个答案:

没有答案