dialog function

Component dialog(
  1. List<Component> children, {
  2. bool? open,
  3. Key? key,
  4. String? id,
  5. String? classes,
  6. Styles? styles,
  7. Map<String, String>? attributes,
  8. Map<String, EventCallback>? events,
})

The <dialog> HTML element represents a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow.

  • open: Indicates that the dialog is active and can be interacted with. When the open attribute is not set, the dialog shouldn't be shown to the user.

Implementation

Component dialog(List<Component> children,
    {bool? open,
    Key? key,
    String? id,
    String? classes,
    Styles? styles,
    Map<String, String>? attributes,
    Map<String, EventCallback>? events}) {
  return DomComponent(
    tag: 'dialog',
    key: key,
    id: id,
    classes: classes,
    styles: styles,
    attributes: {
      ...attributes ?? {},
      if (open == true) 'open': '',
    },
    events: events,
    children: children,
  );
}