AbductionTask constructor
AbductionTask({
- required String identifier,
- SromMeasure? measure,
Constructs the AbductionTask and initializes all required steps and configurations. Sets up the SROM abduction test sequence, sensor configuration, and probe.
Implementation
AbductionTask({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_abduction',
text: 'srom_test_description_abduction',
),
// Preparation step (equipment, positioning, etc)
AbductionPreparationStep(
identifier: 'abduction_preparation',
title: 'preparation',
),
// Test instructions and procedure explanation
AbductionInstructionsStep(
identifier: 'abduction_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_abduction',
title: 'test_completed',
text: 'test_completed_abduction',
),
]);
}