RPVisualArrayChangeResult.fromResults constructor
RPVisualArrayChangeResult.fromResults()
Create a RPVisualArrayChangeResult from a set of results:
right
: the number of correct answerswrong
: the number of wrong answerstimes
: time taken to find the changememoryTimes
: time taken to memorize the shapesscore
: score of the test calculated in model class
Implementation
factory RPVisualArrayChangeResult.fromResults(
int wrong,
int right,
List<dynamic> times,
List<dynamic> memoryTimes,
int score,
) {
var res = RPVisualArrayChangeResult(identifier: 'VisualArrayChangeResults');
res.results.addAll({'Wrong guesses': wrong});
res.results.addAll({'Right guesses': right});
res.results.addAll({'Time taken to memorize': memoryTimes});
res.results.addAll({'Time taken to guess': times});
res.results.addAll({'score': score});
return res;
}