Img constructor
Img({})
Creates an <img> element descriptor with image attribute shorthands.
Implementation
Img({
required String src,
String? alt,
int? width,
int? height,
super.className,
super.style,
Map<String, String>? attrs,
Map<String, BloomEventHandler>? on,
BloomEventHandler? onClick,
}) : super(
'img',
attrs: _mergeAttrs(attrs, {
'src': src,
if (alt != null) 'alt': alt,
if (width != null) 'width': '$width',
if (height != null) 'height': '$height',
}),
on: _mergeEvents(on, onClick: onClick),
);