KasyKasy

Toast

Live preview and documentation for the Toast component.

Preview

componentPreview.loading

About

A temporary notification that appears at the top or bottom of the screen, stackable, with swipe-to-dismiss and automatic pause when hovering the mouse or holding a finger on it. Trigger it via showKasyToast(context, ...) rather than instantiating KasyToast directly (that's just the visual card).

  • title / message: title (required, or promoted from message when empty) and optional body.
  • tone: neutral (brand logo), primary, success, warning, or danger — each with its own icon/color.
  • icon: replaces the tone's default icon with a custom widget.
  • duration: time until auto-dismiss (defaults to 4s).
  • persistent: when true, doesn't dismiss on its own.
  • placement: top or bottom.
  • onClose: callback when closed (manually or automatically).

showKasyToastWidget(context, builder: ...) lets you render a fully custom card in place of the default KasyToast. hideAllKasyToasts() closes all visible toasts at once.

Last updated on 08/23/2026

On this page