$img
ImgElement
$img(
Creates an <img> element (self-closing, no children).
Implementation
ImgElement $img({
required String src,
String? alt,
String? className,
String? id,
int? width,
int? height,
Map<String, dynamic>? style,
Map<String, dynamic>? props,
void Function()? onClick,
}) {
final p = _buildJsxProps(
className: className,
id: id,
style: style,
props: props,
onClick: onClick,
);
p['src'] = src;
if (alt != null) p['alt'] = alt;
if (width != null) p['width'] = width;
if (height != null) p['height'] = height;
return ImgElement.fromJS(_createJsxElement('img', p));
}