nextStroke method Null safety
Implementation
void nextStroke() {
if (!_isQuizzing) {
if (currentStroke == _nStrokes) {
_setCurrentStroke(1);
} else if (_isAnimating) {
_setCurrentStroke(currentStroke + 1);
_strokeAnimationController.reset();
if (currentStroke < _nStrokes) {
_strokeAnimationController.forward();
} else {
_isAnimating = false;
}
} else {
if (currentStroke < _nStrokes) {
_setCurrentStroke(currentStroke + 1);
}
}
notifyListeners();
}
}