AppShell constructor

const AppShell({
  1. required AppUser user,
  2. required List<NavItem> navItems,
  3. Map<String, WidgetBuilder> pages = const {},
  4. Widget? body,
  5. String title = '',
  6. List<AppNotification> notifications = const [],
  7. VoidCallback? onLogout,
  8. ValueChanged<String>? onNavigate,
  9. String? initialRoute,
  10. bool isDark = false,
  11. VoidCallback? onToggleTheme,
  12. Key? key,
})

Implementation

const AppShell({
  required this.user,
  required this.navItems,
  this.pages = const {},
  this.body,
  this.title = '',
  this.notifications = const [],
  this.onLogout,
  this.onNavigate,
  this.initialRoute,
  this.isDark = false,
  this.onToggleTheme,
  super.key,
}) : assert(
       pages.length > 0 || body != null,
       'Forneça `pages` (rota→conteúdo) ou um `body`.',
     );