timeDurationAlert property
double?
timeDurationAlert
Get the value of the subfield timeDurationAlert
Implementation
double? get timeDurationAlert {
final field = getField(EventDataField.ID);
final typeField = getField(EventEventField.ID);
final isSubFieldValid =
typeField != null && [23].contains(typeField.getValue());
if (field != null && field.isValid() && isSubFieldValid) {
var subField = field.getValidSubField(fields);
return field.getValue(subField: subField);
} else {
return null;
}
}
Sets the data subfield with value
. Throws FieldNotDefinedError
if the subfield is not defined in the message.
Implementation
set timeDurationAlert(double? value) {
final field = getField(EventDataField.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);
}
}