Skip to content
Articles
Article

root_toast: Flutter toasts that bottom sheets, dialogs and the keyboard never hide

by Abdeldjalil Chougui dev.to

5 min read

You open a bottom sheet with a form, the user taps Save, the request fails, and you show a SnackBar to say so. Nothing appears. The message is there, but it is behind the sheet. This is a known problem with ScaffoldMessenger SnackBars. They are painted by the Scaffold, underneath any route pushed on top of it. A modal bottom sheet, a dialog or a menu is such a route, so the SnackBar ends up below…

Forum

Questions about this, or something to add?

Discuss on the forum

Report this · Wrote this? Claim it

FlutterX is supported by