Alert

Alerts are used to show feedback in response to user actions.

Component checklist

Flutter

Is new design vision part implemented using new tokens?

Up to date

Resources

 

Examples

Feedback/Alert


                                                        
                                                        
                                                            OptimusAlert(
                                                                          title: Text('Title'),
                                                                          description: Text('description'),
                                                                          variant: OptimusFeedbackVariant.info,
                                                                          link: OptimusFeedbackLink(
                                                                                    text: Text('Link'),
                                                                                    onPressed: () {},
                                                                                ),
                                                                          onDismissed: () {},
                                                                        )
                                                        
                                                            

OptimusAlert Example

 

API

Name

Description

Type

Default

title

The title of the alert.

Widget

 

description

The description of the alert.

Widget?

 

icon

The icon to be used. If not provided it will get the variant’s default icon.

IconData

 

onDismissed

The callback on the alert dismiss button is pressed.

VoidCallback?

 

link

The link with the custom action callback.

OptimusFeedbackLink

 

variant

The variant of the alert, that will determine the color and icon of the alert.

OptimusFeedbackVariant

OptimusFeedbackVariant.info