layout property

ExdLayout? layout

Returns the value of the layout field. Returns null if the field is not defined in the message.

Implementation

ExdLayout? get layout {
  final field = getField(ExdScreenConfigurationLayoutField.ID);
  if (field != null && field.isValid()) {
    var subField = field.getValidSubField(fields);
    final value = field.getValue(subField: subField);
    if (value == null) {
      return null;
    }
    return ExdLayoutExt.fromValue(value);
  } else {
    return null;
  }
}
void layout=(ExdLayout? value)

Sets the layout field with value. Throws FieldNotDefinedError if the field is not defined in the message.

Implementation

set layout(ExdLayout? value) {
  final field = getField(ExdScreenConfigurationLayoutField.ID);

  if (field != null) {
    if (value == null) {
      field.clear();
    } else {
      var subField = field.getValidSubField(fields);
      field.setValue(0, value.value, subField);
    }
  } else {
    throw FieldNotDefinedError(field!.name);
  }
}