RPWordRecallResult.fromResults constructor

RPWordRecallResult.fromResults(
  1. List<String> wordList,
  2. List<String> resultList1,
  3. List<String> resultList2,
  4. List timesTaken,
  5. int score,
)

Create a RPWordRecallResult based on results for Word Recall Test:

  • wordList: list of words to be recalled
  • resultList1: list of recalled words in 1 repetition
  • resultList1: list of recalled words in 2 repetition
  • timeTaken: time taken to recall
  • score: 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;
}