StsTask constructor

StsTask({
  1. required String identifier,
  2. StsMeasure? measure,
})

Constructs the StsTask and initializes all required steps and configurations. Sets up the STS test sequence, sensor selection, and subscribes to sensor selection changes.

Implementation

StsTask({required super.identifier, StsMeasure? measure}) : super(steps: []) {
  _measure = measure ?? _measure;
  steps.addAll([
    RPInstructionStep(
      identifier: 'intro',
      title: 'sts_test_title',
      text: 'sts_test_description',
    ),
    _buildSensorSelectionStep(),
    StsPreparationStep(
      identifier: 'sts_preparation',
      title: 'preparation',
      selectedSensor: _selectedSensor,
    ),
    StsInstructionsStep(
      identifier: 'sts_instructions',
      title: 'instructions',
    ),
    RPTimerStep(
      identifier: 'prepare',
      title: 'get_ready',
      timeout: const Duration(seconds: 3),
      autoSkip: true,
    ),
    _buildStsStep(),
    StsResultStep(
      identifier: 'sts_result',
      title: 'test_completed',
      text: 'test_completed_sts',
    ),
  ]);
  subscribeToSensorSelectionStep();
}