RPPictureSequenceResult.fromResults constructor

RPPictureSequenceResult.fromResults(
  1. List moves,
  2. List scores,
  3. List times,
  4. List memoryTimes,
  5. int score,
  6. dynamic original,
  7. dynamic pictures,
)

Create a RPPictureSequenceResult from results for Picture Sequence Memory Test

  • moves: list of the number of moves made to complete the test
  • times: time taken for each repetition
  • memoryTime: time taken to memorize the sequence of images
  • score: score of the test calculated in model class

Implementation

factory RPPictureSequenceResult.fromResults(
    List<dynamic> moves,
    List<dynamic> scores,
    List<dynamic> times,
    List<dynamic> memoryTimes,
    int score,
    original,
    pictures) {
  var res = RPPictureSequenceResult(identifier: 'PictureSequenceResult');
  res.results.addAll({'Amount of moves': moves});
  res.results.addAll({'Amount of correct pairs': scores});
  res.results.addAll({'Time taken to memorize': memoryTimes});
  res.results.addAll({'Time taken to move pictures': times});
  // res.results.addAll({'Original list': original});
  // res.results.addAll({'new list': pictures});
  res.results.addAll({'score': score});
  return res;
}