Skip to content

RPReactionTimeActivity

Reaction Time Test.

Inheritance
Annotations

Constructors

RPReactionTimeActivity.fromJson

RPReactionTimeActivity.fromJson(
  1. Map<String, dynamic> json
)

RPReactionTimeActivity

RPReactionTimeActivity({
  1. required String identifier,
  2. bool includeInstructions = true,
  3. bool includeResults = true,
  4. int lengthOfTest = 30,
  5. int switchInterval = 4,
})

Contructor for creating a Reaction time Test.

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

lengthOfTest

int lengthOfTest
getter/setter pair

The duration of the test. Default is 30 seconds.

switchInterval

int switchInterval
getter/setter pair

Max seconds until light switch-1. Writing 4 means at most 5 seconds. Default is 4.

Methods

stepBody

Widget stepBody(
  1. dynamic onResultChange(
    1. dynamic
    ),
  2. RPActivityEventLogger eventLogger
)
override

Initiates the UI component for an ActivityStep.

All classes extending an activity step should override this with their own UI components.

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.