RPTaskResult constructor

RPTaskResult({
  1. required String identifier,
})

Create a RPTaskResult with a given identifier and an empty map of results.

identifier should always be the identifier of the "parent" task. It sets startDate to the DateTime.now(). Since these objects are instantiated together with the Task it belongs to so it can be used for measuring how much time the participant spent on the given Task.

Implementation

RPTaskResult({required super.identifier}) {
  results = {};
  startDate = DateTime.now();
}