garminProduct property

int? garminProduct

Get the value of the subfield garminProduct

Implementation

int? get garminProduct {
  final field = getField(ScheduleProductField.ID);
  final typeField = getField(ScheduleManufacturerField.ID);

  final isSubFieldValid =
      typeField != null && [1, 15, 13, 89].contains(typeField.getValue());
  if (field != null && field.isValid() && isSubFieldValid) {
    var subField = field.getValidSubField(fields);
    return field.getValue(subField: subField);
  } else {
    return null;
  }
}
void garminProduct=(int? value)

Sets the product subfield with value. Throws FieldNotDefinedError if the subfield is not defined in the message.

Implementation

set garminProduct(int? value) {
  final field = getField(ScheduleProductField.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);
  }
}