SromTestStep class
The main step for performing a Shoulder Range of Motion (SROM) test. Handles probe start/stop, real-time angle tracking, and result processing.
- Inheritance
-
- Object
- Serializable
- RPStep
- RPActivityStep
- MobilityStep<
SromResult, SromMeasure> - SromTestStep
Constructors
- SromTestStep.new({required SromMeasure measure, required MobilityConfig config, required MobilityProbe probe, required SromProcessor processor, bool includeInstructions = false, bool includeResults = false})
Properties
- $type ↔ String?
-
The runtime class name (type) of this object.
Used for deserialization from JSON objects.
getter/setter pairinherited
- config → MobilityConfig
-
The configuration for this mobility step.
finalinherited
- footnote ↔ String?
-
Optional footer text to be displayed below the question.
This can be used to provide additional information, such as copyright, or instructions.
This text will be displayed in a smaller font size.
getter/setter pairinherited
- fromJsonFunction → Function
-
The function which can convert a JSON string to an object of this type.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
A unique identifier of the Step. This identifier connects the step to its
result (
RPResult
) object.finalinherited - includeInstructions ↔ bool
-
Show the instruction before the test?
getter/setter pairinherited
- includeResults ↔ bool
-
Show the results after the test?
getter/setter pairinherited
- jsonType → String
-
Return the
__type
to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.no setterinherited -
liveAngle
→ ValueNotifier<
double> -
Live angle notifier exposed to UI
Returns a ValueNotifier for the live angle, exposed to the UI.
no setter
- measure → SromMeasure
-
The measure associated with this mobility step.
finalinherited
- optional ↔ bool
-
Can this step be skipped? If so, the result for the step will be
null
.getter/setter pairinherited - probe → MobilityProbe
-
The probe used to collect mobility data.
finalinherited
- processor → SromProcessor
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stepWidget → Widget
-
The widget (UI representation) of the step.
no setterinherited
- text ↔ String?
-
The text of the Step. Different types of Steps are using the
text
text differently.getter/setter pairinherited - timer ↔ Timer?
-
getter/setter pairinherited
- title ↔ String
-
The title text. Different types of Steps are using the
title
text differently.getter/setter pairinherited
Methods
-
calculateScore(
dynamic result) → int -
Calculates the score from the SROM result. Returns the rounded range of motion angle.
override
-
execute(
) → Future< SromResult> -
Executes the SROM test step by calling performSROM.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performSROM(
) → Future< SromResult> - Performs the SROM test by starting the probe, tracking angles in real-time, waiting for the test duration, stopping the probe, processing the data, and returning the result.
-
startGyroTracking(
) → void - Starts listening to gyroscope data for real-time angle tracking.
-
stepBody(
dynamic onResultChange(dynamic), RPActivityEventLogger eventLogger) → Widget -
Builds the step body widget for the SROM test.
override
-
stopGyroTracking(
) → void - Stops listening to gyroscope data and resets the tracker.
-
testEndReset(
) → void - Resets the test state at the end of the test, including probe and angle tracker.
-
toJson(
) → Map< String, dynamic> -
Return a JSON encoding of this object.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited