form function
ElementNode
form(
{ - Object? key,
- String? action,
- String method = 'get',
- String? classes,
- Map<String, String>? style,
- EventCallback? onSubmit,
- Map<String, Attribute>? attrs,
- Children children = const [],
})
Implementation
ElementNode form({
Object? key,
String? action,
String method = 'get',
String? classes,
Map<String, String>? style,
EventCallback? onSubmit,
Map<String, Attribute>? attrs,
Children children = const [],
}) {
return el(
'form',
key: key,
classes: classes,
style: style,
onClick: onSubmit,
attrs: {
if (action != null) 'action': StringAttribute(action),
'method': StringAttribute(method),
...?attrs,
},
children: children,
);
}