circular_countdown_timer
circular_countdown_timer copied to clipboard
CountDown timer not working on the background state of App
I have a workout app that plays different exercises and some beep and tts onChange condition. So whenever the app goes on background timer stop working even not restarted in the background. Kindly help me to solve this problem. Thank you
same problem. Need to notify the user when my timer completes, even if in the background. Please clarify.
same problem.
Mine is also a workout app. I have an issue where it says
_AssertionError ('package:flutter/src/animation/animation_controller.dart': Failed assertion: line 493 pos 7: '_ticker != null': AnimationController.reverse() called after AnimationController.dispose()
AnimationController methods should not be used after calling dispose.)
when I try to display this widget after it was hidden (another one was shown using a conditional). The error leads me to this line:
void start() {
if (_isReverse != null && _state != null && _state?._controller != null) {
if (_isReverse!) {
_state?._controller?<PUTS CURSOR HERE>.reverse(
from: _initialDuration == 0
? 1
: 1 - (_initialDuration! / _duration!));
} else {
_state?._controller?.forward(
from: _initialDuration == 0 ? 0 : (_initialDuration! / _duration!));
}
isStarted = true;
isPaused = false;
isResumed = false;
isRestarted = false;
}
}
and these are my args
CircularCountDownTimer(
duration: currentSecond,
fillColor: Colors.transparent,
ringColor: Colors.transparent,
height: MediaQuery.of(context).size.height * 0.40,
width: 180,
autoStart: false,
isReverse: true,
controller: _countdownController,
onComplete: () async => await _onFinished(),
textStyle: TextStyle(
fontSize: 160,
color: resting ? Colors.grey : Colors.black,
),
),