startTest method
void
startTest()
Implementation
void startTest() {
if (mounted) {
widget.eventLogger.instructionEnded();
widget.eventLogger.testStarted();
setState(() {
//change screen
activityStatus = ActivityStatus.Test;
});
}
Timer(Duration(seconds: widget.activity.lengthOfTest), () {
//when time is up, change window and set result
widget.eventLogger.testEnded();
if (mounted) {
setState(() {});
widget.onResultChange(
{'mistakes': mistakes, 'correct taps': correctTaps});
if (widget.activity.includeResults) {
widget.eventLogger.resultsShown();
setState(() {
activityStatus = ActivityStatus.Result;
});
}
}
});
wordPulse();
}