startTest method
void
startTest()
Implementation
void startTest() {
widget.eventLogger.instructionEnded();
widget.eventLogger.testStarted();
//begin test by changing window and starting timer.
setState(() {
activityStatus = ActivityStatus.Test;
});
containerPeaker();
timer = Timer(Duration(seconds: widget.activity.maxTestDuration), () {
//when time is up, change window and set result
widget.onResultChange({'successes': successes, 'mistakes': mistakes});
widget.eventLogger.testEnded();
if (widget.activity.includeResults) {
widget.eventLogger.resultsShown();
if (mounted) {
setState(() {
activityStatus = ActivityStatus.Result;
});
}
}
});
}