Property constructor

Property(
  1. String definition,
  2. ValueType defaultValueType, {
  3. dynamic parser(
    1. Property property,
    2. String textValue
    )?,
})

Creates a new Property

Implementation

Property(
  this.definition,
  ValueType defaultValueType, {
  dynamic Function(Property property, String textValue)? parser,
})  : name = _getName(definition),
      textValue = _getTextContent(definition),
      parameters = _parseParameters(definition) {
  value = parser != null
      ? parser(this, textValue)
      : _parsePropertyValue(this, defaultValueType);
}