RPDelayedRecallResult.fromResults constructor

RPDelayedRecallResult.fromResults(
  1. List<String> wordList,
  2. List<String> resultList,
  3. int timeTaken,
  4. int score,
)

Create a RPDelayedRecallResult based on results for Delayed Recall Test:

  • wordList: list of words to be recalled
  • resultList: list of recalled words
  • timeTaken: time taken to recall
  • score: score of the test calculated in model class

Implementation

factory RPDelayedRecallResult.fromResults(
  List<String> wordList,
  List<String> resultList,
  int timeTaken,
  int score,
) {
  var res = RPDelayedRecallResult(identifier: 'DelayedRecallResult');
  res.results.addAll({'wordlist delayed': wordList});
  res.results.addAll({'resultlist3': resultList});
  res.results.addAll({'time taken': timeTaken});
  res.results.addAll({'score': score});
  return res;
}