object function
The <object> HTML element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
data
: The address of the resource as a valid URL. At least one of data and type must be defined.name
: The name of valid browsing context (HTML5).type
: The content type of the resource specified by data. At least one of data and type must be defined.width
: The width of the displayed resource in CSS pixels.height
: The height of the displayed resource in CSS pixels.
Implementation
Component object(List<Component> children,
{String? data,
String? name,
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: 'object',
key: key,
id: id,
classes: classes,
styles: styles,
attributes: {
...attributes ?? {},
if (data != null) 'data': data,
if (name != null) 'name': name,
if (type != null) 'type': type,
if (width != null) 'width': '$width',
if (height != null) 'height': '$height',
},
events: events,
children: children,
);
}