customTargetHeartRateLow property
int?
customTargetHeartRateLow
Get the value of the subfield customTargetHeartRateLow
Implementation
int? get customTargetHeartRateLow {
final field = getField(WorkoutStepCustomTargetValueLowField.ID);
final typeField = getField(WorkoutStepTargetTypeField.ID);
final isSubFieldValid =
typeField != null && [1, 13].contains(typeField.getValue());
if (field != null && field.isValid() && isSubFieldValid) {
var subField = field.getValidSubField(fields);
return field.getValue(subField: subField);
} else {
return null;
}
}
Sets the customTargetValueLow subfield with value
. Throws FieldNotDefinedError
if the subfield is not defined in the message.
Implementation
set customTargetHeartRateLow(int? value) {
final field = getField(WorkoutStepCustomTargetValueLowField.ID);
if (field != null) {
if (value == null) {
field.clear();
} else {
var subField = field.getValidSubField(fields);
field.setValue(0, value, subField);
}
} else {
throw FieldNotDefinedError(field!.name);
}
}