DCFElement constructor

DCFElement({
  1. required String type,
  2. String? key,
  3. required Map<String, dynamic> props,
  4. List<DCFComponentNode> children = const [],
})

Implementation

DCFElement({
  required this.type,
  super.key,
  required this.props,
  this.children = const [],
}) {
  // Set parent reference for children
  for (var child in children) {
    child.parent = this;
  }
}