getChildrenProperty<TFormElement> method

  1. @override
Property<List<TFormElement>> getChildrenProperty<TFormElement>({
  1. FormElement? parent,
  2. required String childrenPropertyName,
  3. required ElementParserFunction parser,
  4. bool isContentProperty = false,
  5. bool isImmutable = true,
})
override

Implementation

@override
Property<List<TFormElement>> getChildrenProperty<TFormElement>(
    {FormElement? parent,
    required String childrenPropertyName,
    required ElementParserFunction parser,
    bool isContentProperty = false,
    bool isImmutable = true}) {
  var childrenList = element[childrenPropertyName] as List?;
  var children = childrenList == null
      ? <TFormElement>[]
      : childrenList
          .map((c) => parser(JsonParserNode(c), parent))
          .cast<TFormElement>()
          .toList();
  var childrenProperty = createProperty(children, isImmutable);
  return childrenProperty;
}