Actions
Show Toast

showToast

The ShowToast enables the display of informative toast messages, providing temporary and non-intrusive notifications or alerts within your application for important updates or messages.

Test in Kitchen Sink (opens in a new tab)

Properties

PropertyTypeDescription
showToastobjectShowing a toast message
optionsobjectSelect a built-in toast style.
stylesobjectToast's styles

showToast

PropertyTypeDescription
messagestringThe toast message. Either this message or a widget must be provided.
widgetobjectThe custom widget to show as the Toast's body. Either this widget or a toast message must be provided.
optionsobjectSelect a built-in toast style.
stylesobjectToast's styles

options

PropertyTypeDescription
typestringSelect a built-in toast style.
dismissiblebooleanWhether to show a dismiss button (default is True)
positionstringToast's position. Can be one of: top, topLeft, topRight, center, centerLeft, centerRight, bottom, bottomLeft, bottomRight
durationintegerThe number of seconds before the toast is dismissed. Minimum value is 1.

styles

PropertyTypeDescription
backgroundColorToast's background color starting with '0xFF' for full opacity e.g 0xFFCCCCCC
shadowColorstring or numberBox shadow color starting with '0xFF' for full opacity.
shadowRadiusintegerToast's shadow radius. Minimum value is 0.
shadowOffsetarrayToast's shadow offset.
borderRadiusToast's border radius.
expandedbooleanIf the parent is a Row or Column, this flag will stretch this widget in the appropriate direction. (e.g stretch horizontally for parent of type Row)
sizeintegerSpecifies the width (progress bar) or the diameter (circular progress indicator)
thicknessintegerSpecifies the thickness of the indicator (for progress bar this is the height)
colorProgress indicator color.