rafalbednarczuk/curved_navigation_bar

ScaffoldMessenger shown under NavBar

marcoberetta96 opened this issue · 1 comments

ScaffoldMessenger messages are shown under the CurvedNavigationBar and this looks very ugly.
Is there any way to show ScaffoldMessenger messages on the top of the CurvedNavigationBar?
Thanks!

It's possible to show the SnackBar over CurvedNavigationBar by setting behavior and margin.
CurvedNavigationBar is set that way that it overflows over the body of a Scaffold, that's why by default the SnackBar is under the CurvedNavigationBar

ScaffoldMessenger.of(context).showSnackBar(
  SnackBar(
    behavior:SnackBarBehavior.floating ,
    margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 20.0),
    content: Text("Very important message"),
  ),
);

Simulator Screenshot - iPhone 15 - 2024-06-03 at 11 01 06
__