I am using persistent_bottom_nav_bar: ^5.0.2, and until now keep the botton navigation bar for all the screen, but, How can i show a global snakbar? I want to generate a snakcbar in creen A, and when i swich to creen B (using botton navigation) keep it visible. Actually when i swich the snakbar dont show in the other one
const MainUI({super.key});
@override
State<MainUI> createState() => _MainUIState();
}
class _MainUIState extends State<MainUI> {
late PersistentTabController _controller;
final screens = [
SalesPage(), //<- I want that when i change to this one keep wathing it
ConfigurationPage(), //<- I had inside this screen other screen and in this one is where i show my SnakcBar
];
final _navBarsItems = [
PersistentBottomNavBarItem(
icon: const Icon(Icons.food_bank),
title: ("Sales"),
activeColorPrimary: CupertinoColors.white,
inactiveColorPrimary: CupertinoColors.systemGrey,
),
PersistentBottomNavBarItem(
icon: Icon(CupertinoIcons.settings),
title: ("Configuration"),
activeColorPrimary: CupertinoColors.white,
inactiveColorPrimary: CupertinoColors.systemGrey,
),
];
@override
void initState() {
super.initState();
_controller = PersistentTabController(initialIndex: 0);
}
@override
Widget build(BuildContext context) {
return PersistentTabView(
key: scaffoldKey,
backgroundColor: Colors.blue.shade400,
context,
screens: screens,
items: _navBarsItems,
);
}
}
I am using
persistent_bottom_nav_bar: ^5.0.2
, and until now keep the botton navigation bar for all the screen, but, How can i show a global snakbar? I want to generate a snakcbar in creen A, and when i swich to creen B (using botton navigation) keep it visible. Actually when i swich the snakbar dont show in the other one