Skip to content

RPFlankerActivity

Flanker Test.

Inheritance
Annotations

Constructors

RPFlankerActivity.fromJson

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

RPFlankerActivity

RPFlankerActivity({
  1. required String identifier,
  2. bool includeInstructions = true,
  3. bool includeResults = true,
  4. int lengthOfTest = 90,
  5. int numberOfCards = 25,
})

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

Test duration in seconds. Default is 90 seconds.

numberOfCards

int numberOfCards
getter/setter pair

Number of cards to be presented. Default is 25.

Methods

calculateScore

int calculateScore(
  1. dynamic result
)
override

The score is the number of mistakes made during the test. If the number of mistakes > 2, the test is failed and a score of 0 is returned. Otherwise, a score of 1 is returned.

calculateScoreFlanker

List calculateScoreFlanker(
  1. dynamic result
)

Calculate scores - sum, mean congruent, mean incongruent

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.