Prevent navigation bar from transitioning along with entire screen
What changed, and why it matters
This commit is a user-interface polish change. It wraps the app's bottom navigation bar in a Flutter 'Hero' widget so the navigation bar stays visually fixed while the rest of the screen animates during page transitions. There is no security change visible in the diff.
No security action needed. Review as a normal UI/UX change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds a Hero widget with tag ‘main-navigation-bar’ around the existing NavigationBar in lib/widgets/wallet_navigation_bar.dart. Hero widgets in Flutter animate matching elements across route transitions. The navigation destinations, route names, and tap handlers are unchanged. No security-sensitive code (authentication, cryptography, storage, network, permissions) is modified.
Changed components
lib/widgets/wallet_navigation_bar.dartInspect captured patch +15 / −12
diff --git a/lib/widgets/wallet_navigation_bar.dart b/lib/widgets/wallet_navigation_bar.dart
index 0f8cf89..c59f429 100644
--- a/lib/widgets/wallet_navigation_bar.dart
+++ b/lib/widgets/wallet_navigation_bar.dart
@@ -10,18 +10,21 @@ class WalletNavigationBar extends StatelessWidget {
Widget build(BuildContext context) {
final i18n = AppLocalizations.of(context)!;
- return NavigationBar(
- selectedIndex: selectedIndex,
- onDestinationSelected: (index) => {
- if (index == 0 && selectedIndex != 0) {Navigator.pushNamed(context, '/wallet_home')},
- if (index == 1 && selectedIndex != 1) {Navigator.pushNamed(context, '/address_book')},
- if (index == 2 && selectedIndex != 2) {Navigator.pushNamed(context, '/settings')},
- },
- destinations: [
- NavigationDestination(icon: Icon(Icons.wallet), label: i18n.navigationBarWallet),
- NavigationDestination(icon: Icon(Icons.contacts), label: i18n.addressBookTitle),
- NavigationDestination(icon: Icon(Icons.settings), label: i18n.navigationBarSettings),
- ],
+ return Hero(
+ tag: 'main-navigation-bar',
+ child: NavigationBar(
+ selectedIndex: selectedIndex,
+ onDestinationSelected: (index) => {
+ if (index == 0 && selectedIndex != 0) {Navigator.pushNamed(context, '/wallet_home')},
+ if (index == 1 && selectedIndex != 1) {Navigator.pushNamed(context, '/address_book')},
+ if (index == 2 && selectedIndex != 2) {Navigator.pushNamed(context, '/settings')},
+ },
+ destinations: [
+ NavigationDestination(icon: Icon(Icons.wallet), label: i18n.navigationBarWallet),
+ NavigationDestination(icon: Icon(Icons.contacts), label: i18n.addressBookTitle),
+ NavigationDestination(icon: Icon(Icons.settings), label: i18n.navigationBarSettings),
+ ],
+ ),
);
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.