fillProperties method

void fillProperties(
  1. TFormElement formElement,
  2. ParserNode parserNode,
  3. Element? parent,
  4. ElementParserFunction parser,
)

Implementation

void fillProperties(TFormElement formElement, ParserNode parserNode,
    Element? parent, ElementParserFunction parser) {
  var id = parserNode.getPlainString('id');
  if (!_isIdValid(id)) {
    developer.log(
      'Warning: Invalid identifier \'$id\' for element type $TFormElement in FormElementParser.\n'
      'Only alphanumerics characters and underscores are allowed and identifiers cannot start with a number.',
      level: 900, // 900 relates to Warning according to the package:logging
    );
  }
  formElement
    ..id = id
    ..isVisibleProperty = parserNode.getIsVisibleProperty()
    ..parentProperty = parserNode.getParentProperty(parent as FormElement?);
}