create method

DCFElement create(
  1. String type,
  2. Map<String, dynamic> props,
  3. List<DCFComponentNode> children
)

Create a component instance with the given type, props and children

Implementation

DCFElement create(String type, Map<String, dynamic> props, List<DCFComponentNode> children) {
  final factory = _factories[type];
  if (factory == null) {
    throw Exception('Component factory not found: $type');
  }

  return factory(props, children);
}