ExtensionTask constructor
ExtensionTask({
- required String identifier,
- SromMeasure? measure,
Constructs the ExtensionTask and initializes all required steps and configurations. Sets up the SROM extension test sequence, sensor configuration, and probe.
Implementation
ExtensionTask({required super.identifier, SromMeasure? measure})
: super(steps: []) {
// Use provided measure or default
this.measure = measure ?? this.measure;
// Configure the SROM test (sensor location, sampling rates, etc)
config = SromConfig(
sensorLocation: SensorLocation.upperArm,
gyroscopeSamplingRate: 104.0,
useAccelerometer: false,
useGyroscope: true,
useMagnetometer: false,
);
// Initialize the probe with Movesense sensor and config
probe = MobilityProbe(config: config, sensor: MovesenseSensor());
// Build the complete test sequence with all required steps
steps.addAll([
// Introduction and overview step
RPInstructionStep(
identifier: 'intro',
title: 'srom_test_title_extension',
text: 'srom_test_description_extension',
),
// Preparation step (equipment, positioning, etc)
ExtensionPreparationStep(
identifier: 'extension_preparation',
title: 'preparation',
),
// Test instructions and procedure explanation
ExtensionInstructionsStep(
identifier: 'extension_instructions',
title: 'instructions',
),
// Countdown timer before test execution
RPTimerStep(
identifier: 'prepare',
title: 'get_ready',
timeout: const Duration(seconds: 3),
autoSkip: true,
),
// Main SROM test execution step
_buildSromTestStep(),
// Result display step
SromResultStep(
identifier: 'srom_result_extension',
title: 'test_completed',
text: 'test_completed_extension',
),
]);
}