arch-atlas

App Shell Scaffold

presentation/widgets/app_shell_scaffold.dart

presentation

Overview

ConsumerStatefulWidget wrapping every screen reachable via the ShellRoute with a 5-item BottomNavigationBar (or 3 items for guests). Index 2 is the floating '+' that toggles the arc-menu instead of navigating.

User Flow

  1. Watches authStateProvider, arcMenuProvider and bottomNavIndexProvider.
  2. _buildNavItems returns 3 or 5 items depending on isLoggedIn.
  3. _onItemTapped: if logged in and index==2 → toggle arcMenuProvider; else update bottomNavIndexProvider and context.goNamed('home').
  4. When arcMenuProvider is true, draws a BackdropFilter blur layer and the ArcSearchMenu on top.

Cases & Edge Cases

  • navIndex is shifted around the '+' slot for authenticated users (currentIndex < 2 ? currentIndex : currentIndex + 1) so the underlying page list never includes the '+'.
  • context.goNamed('home') on tab-tap rather than IndexedStack.setState — required because the user could be on a secondary screen pushed on top of the shell.
  • Backdrop blur uses ImageFilter.blur(8,8) + 25% black overlay — tuning this affects perceived perf on low-end Android.

Code References

  • lib/src/features/shared/home/presentation/widgets/app_shell_scaffold.dart:17 // AppShellScaffold
  • lib/src/features/shared/home/presentation/widgets/app_shell_scaffold.dart:145 // _buildNavItems
  • lib/src/features/shared/home/presentation/widgets/app_shell_scaffold.dart:197 // _onItemTapped

API Calls

Empty — fill this in later. Open the manifest and add content here.

Notes

Commented-out 'Mode Prestataire' banner is intentional — toggled off post-design review. Don't delete without checking with product first.