element function

Element element(
  1. String tag,
  2. dynamic children, {
  3. String? id,
  4. String? className,
  5. Map<String, dynamic>? attributes,
})

Generic helper for custom elements.

Implementation

Element element(
  String tag,
  dynamic children, {
  String? id,
  String? className,
  Map<String, dynamic>? attributes,
}) => h(
  tag,
  id: id,
  className: className,
  attributes: attributes,
  children: children is List ? children : [children],
);