cancel method
Chancels this countdown.
Implementation
void cancel({bool fromConstructor = false}) {
_timer?.cancel();
_timer = null;
_currentDuration = duration;
_currentSecondsToSubtract = secondsToSubtract;
if (!fromConstructor) {
for (CountdownListener listener in listeners) {
listener.onCancelled();
}
}
}