Skip to content

Toast

A Toast is a brief notification that appears temporarily to inform users of a process, action, or state change.

Use Toasts to provide non-intrusive feedback without blocking the user’s current task, ideal for confirmations, status updates, and reminders.

Common alternative names:
Snackbar, Notification, Banner


Basic toast with default subtle styling.


Toast with contrasting background for better visibility.


Toast with accent color background for important messages.


Toast with an additional caption text.


Toast with a text action button.


Toast with an icon button action.


Toast with a leading icon.


PropertyTypeDescription
messageStringThe main text displayed in the toast.
captionString?Optional secondary text shown below the main message.
typeToastTypeVisual style of the toast.
leadingIconWidget?Optional icon widget displayed at the start of the toast.
actionTextString?Text for the optional action button.
onActionPressedVoidCallback?Callback function when the action button is pressed.
actionIconWidget?Optional icon widget for the action instead of text.
durationDurationTime before the toast auto-dismisses. Default: 4 seconds.
marginEdgeInsets?Custom margin around the toast container.
paddingEdgeInsets?Custom padding inside the toast container.
borderRadiusBorderRadius?Custom border radius for the toast container.
elevationdouble?Custom elevation (shadow) for the toast.
messageStyleTextStyle?Custom text style for the main message.
captionStyleTextStyle?Custom text style for the caption.
actionTextStyleTextStyle?Custom text style for the action button text.