RPFlankerResult.fromResults constructor
RPFlankerResult.fromResults()
Create a Flanker Test result based on obtained results.
wrong
: number of wrong answersright
: number of right answerstime
: time taken to finish the testscore
: score of the test calculated in model class
Implementation
factory RPFlankerResult.fromResults(
int wrong,
int right,
int time,
int score,
double meanCongruent,
double meanIncongruent,
int numberCardsCongruent,
int numberCardsIncongruent,
) {
var res = RPFlankerResult(identifier: 'FlankerTaskResult');
res.results.addAll({'wrong swipes': wrong});
res.results.addAll({'right swipes': right});
res.results.addAll({'time': time});
res.results.addAll({'score': score});
res.results.addAll({'meanCongruent': meanCongruent});
res.results.addAll({'meanIncongruent': meanIncongruent});
res.results.addAll({'numberCardsCongruent': numberCardsCongruent});
res.results.addAll({'numberCardsIncongruent': numberCardsIncongruent});
return res;
}