RPStepResult.withParams constructor
Returns an RPStepResult with a given identifier and an empty map of results.
It sets startDate to the DateTime.now()
. Since these objects are instantiated
together with the Step it belongs to so it can be used for measuring how much
time the participant spent the given Step.
Implementation
RPStepResult.withParams(RPStep step) : super.withIdentifier(step.identifier) {
this._results = Map();
if (step.runtimeType == RPQuestionStep) {
this.answerFormat = (step as RPQuestionStep).answerFormat;
}
startDate = DateTime.now();
}