RPWordRecallResult.fromResults constructor
RPWordRecallResult.fromResults()
Create a RPWordRecallResult based on results for Word Recall Test:
wordList
: list of words to be recalledresultList1
: list of recalled words in 1 repetitionresultList1
: list of recalled words in 2 repetitiontimeTaken
: time taken to recallscore
: score of the test calculated in model class
Implementation
factory RPWordRecallResult.fromResults(
List<String> wordList,
List<String> resultList1,
List<String> resultList2,
List<dynamic> timesTaken,
int score) {
var res = RPWordRecallResult(identifier: 'WordRecallResult');
res.results.addAll({'wordlist': wordList});
res.results.addAll({'resultlist1': resultList1});
res.results.addAll({'resultlist2': resultList2});
res.results.addAll({'times taken': timesTaken});
res.results.addAll({'score': score});
return res;
}