createElement method

DCFElement createElement(
  1. String type, {
  2. Map<String, dynamic>? props,
  3. List<DCFComponentNode>? children,
  4. String? key,
})

Create an element

Implementation

DCFElement createElement(
  String type, {
  Map<String, dynamic>? props,
  List<DCFComponentNode>? children,
  String? key,
}) {
  return DCFElement(
    type: type,
    props: props ?? {},
    children: children ?? [],
    key: key,
  );
}