getChildProperty<TFormElement> method

  1. @override
Property<TFormElement> getChildProperty<TFormElement>({
  1. required String propertyName,
  2. required ElementParserFunction parser,
  3. required FormElement parent,
  4. required TFormElement defaultValue(),
  5. bool isContentProperty = false,
  6. bool isImmutable = true,
})
override

Implementation

@override
Property<TFormElement> getChildProperty<TFormElement>({
  required String propertyName,
  required ElementParserFunction parser,
  required FormElement parent,
  required TFormElement Function() defaultValue,
  bool isContentProperty = false,
  bool isImmutable = true,
}) {
  var childElement = element[propertyName] as Map<String, dynamic>?;

  if (childElement != null) {
    return createProperty<TFormElement>(
        parser(JsonParserNode(childElement), parent) as TFormElement,
        isImmutable);
  }
  return createProperty<TFormElement>(defaultValue(), isImmutable);
}