Alert constructor
const
Alert({})
Creates an Alert with standard styling.
All content parameters are optional, allowing for flexible layouts from simple text alerts to complex multi-element notifications.
Parameters:
leading(Widget?, optional): Icon or widget at the starttitle(Widget?, optional): Main heading or messagecontent(Widget?, optional): Detailed description or bodytrailing(Widget?, optional): Action buttons or dismissal controlsdestructive(bool, default: false): Whether to use destructive styling
Example:
Alert(
title: Text('Success'),
content: Text('Operation completed successfully.'),
);
Implementation
const Alert(
{super.key,
this.leading,
this.title,
this.content,
this.trailing,
this.destructive = false});