GetDeviceStateResult class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
- GetDeviceStateResult({required int measurementState, required int measurementLength, required int totalLength, required int size, required int crc})
-
constfactory
- GetDeviceStateResult.fromBytes(Uint8List data)
-
factory
-
GetDeviceStateResult.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
copyWith
→ $GetDeviceStateResultCopyWith<
GetDeviceStateResult> -
Create a copy of GetDeviceStateResult
with the given fields replaced by the non-null parameter values.
no setterinherited
- crc → int
-
no setterinherited
- hasData → bool
-
Whether the device has valid measurement data.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isIdle → bool
-
Whether the device is idle (no measurement, no data).
no setter
- isRecording → bool
-
Whether a measurement is currently in progress.
no setter
- measurementLength → int
-
no setterinherited
- measurementState → int
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
no setterinherited
- stateDescription → String
-
Human-readable state description.
0 = No Measurement and No Data
1 = Measurement in progress
2 = Measurement Completed & Data Ready
no setter
- totalLength → int
-
no setterinherited
- validCrc → int?
-
CRC (only valid when hasData).
Returns null if no valid measurement data.
no setter
- validMeasurementLength → int?
-
Measurement length in seconds (only valid when hasData or isRecording).
Returns null if no valid measurement.
no setter
- validSize → int?
-
Size in bytes (only valid when hasData).
Returns null if no valid measurement data.
no setter
- validTotalLength → int?
-
Total length in 100ths of seconds (only valid when hasData or isRecording).
Returns null if no valid measurement.
no setter
Methods
-
map<
TResult extends Object?> (TResult $default(_GetDeviceStateResult value)) → TResult -
Available on GetDeviceStateResult, provided by the GetDeviceStateResultPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_GetDeviceStateResult value)?) → TResult? -
Available on GetDeviceStateResult, provided by the GetDeviceStateResultPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_GetDeviceStateResult value)?, {required TResult orElse()}) → TResult -
Available on GetDeviceStateResult, provided by the GetDeviceStateResultPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(int measurementState, int measurementLength, int totalLength, int size, int crc)?, {required TResult orElse()}) → TResult -
Available on GetDeviceStateResult, provided by the GetDeviceStateResultPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this GetDeviceStateResult to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(int measurementState, int measurementLength, int totalLength, int size, int crc)) → TResult -
Available on GetDeviceStateResult, provided by the GetDeviceStateResultPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(int measurementState, int measurementLength, int totalLength, int size, int crc)?) → TResult? -
Available on GetDeviceStateResult, provided by the GetDeviceStateResultPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited