button
ButtonElement
button(
Create a button element
Implementation
ButtonElement button({
required String text,
void Function()? onClick,
Map<String, dynamic>? props,
Map<String, dynamic>? style,
String? className,
}) {
final p = _buildProps(props: props, style: style, className: className);
if (onClick != null) p['onClick'] = onClick;
return ButtonElement.fromJS(
createElement('button'.toJS, createProps(p), text.toJS),
);
}