root_toast: Flutter toasts that stay visible above bottom sheets, dialogs and the keyboard
A Flutter developer describes a common issue where SnackBars from ScaffoldMessenger get hidden behind modal bottom sheets, dialogs, or the keyboard. They introduce root_toast, a package whose toasts are drawn in the root Overlay so they remain above every route and the keyboard. The package offers four toast types, three positions, and replace, queue, or stack policies for handling multiple toasts. It also supports swipe and tap dismissal, screen-reader announcements, reduced-motion support, and safe calls after an await. Installation is via GitHub, with setup options for widgets and for showing toasts from services without a BuildContext.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in