hacktons / convex_bottom_bar

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.
https://bar.hacktons.cn
Apache License 2.0
791 stars 147 forks source link

How can I refresh a page during page transitions? #205

Open sedsax opened 10 months ago

sedsax commented 10 months ago

When switching between pages from these tabs, the page does not refresh. If there are 3 notifications on the notification page, when I enter the page, it should be marked as read and new notifications should come, but they do not. The information is updated when you scroll down the page. However, when I scroll down the page, I can see new notifications.

ConvexAppBar _homeBottomNavigation(BuildContext context) { return ConvexAppBar.badge( { 4: 'notificationCount', }, items: const [ TabItem(icon: Icons.home, title: "A"), TabItem(icon: Icons.people, title: "S"), TabItem(icon: Icons.add, title: "Y"), TabItem(icon: Icons.business_center, title: "C"), TabItem(icon: Icons.notifications, title: "B"), // I want the data to be updated when I move to this page from other pages ], onTap: (index) { null, }, ); }