$audio

El $audio({

  1. String? src,
  2. String? className,
  3. String? id,
  4. bool? controls,
  5. bool? autoplay,
  6. bool? loop,
  7. bool? muted,
  8. Map<String, dynamic>? style,
  9. Map<String, dynamic>? props,
})

Creates an <audio> element wrapper for JSX-style composition.

Implementation

El $audio({
  String? src,
  String? className,
  String? id,
  bool? controls,
  bool? autoplay,
  bool? loop,
  bool? muted,
  Map<String, dynamic>? style,
  Map<String, dynamic>? props,
}) {
  final p = _buildJsxProps(
    className: className,
    id: id,
    style: style,
    props: props,
  );
  if (src != null) p['src'] = src;
  if (controls != null) p['controls'] = controls;
  if (autoplay != null) p['autoplay'] = autoplay;
  if (loop != null) p['loop'] = loop;
  if (muted != null) p['muted'] = muted;
  return El(_createJsxElement('audio', p));
}