embed function
The <embed> HTML element embeds external content at the specified point in the document. This content is provided by an external application or other source of interactive content such as a browser plug-in.
src
: The URL of the resource being embedded.type
: The MIME type to use to select the plug-in to instantiate.width
: The displayed width of the resource, in CSS pixels.height
: The displayed height of the resource, in CSS pixels.
Implementation
Component embed(
{required String src,
String? type,
int? width,
int? height,
Key? key,
String? id,
String? classes,
Styles? styles,
Map<String, String>? attributes,
Map<String, EventCallback>? events}) {
return DomComponent(
tag: 'embed',
key: key,
id: id,
classes: classes,
styles: styles,
attributes: {
...attributes ?? {},
'src': src,
if (type != null) 'type': type,
if (width != null) 'width': '$width',
if (height != null) 'height': '$height',
},
events: events,
);
}