import 'package:flutter/material.dart'; import '../../core/widgets/app_widgets.dart'; import '../eta/eta_screen.dart'; import '../alerts/alerts_screen.dart'; import 'house_screen.dart'; import '../profile/profile_screen.dart'; class MainShell extends StatefulWidget { const MainShell({super.key}); @override State createState() => _MainShellState(); } class _MainShellState extends State { int _currentIndex = 0; static const List _screens = [ EtaScreen(), AlertsScreen(), MyHouseScreen(), ProfileScreen(), ]; @override Widget build(BuildContext context) { return Scaffold( body: IndexedStack(index: _currentIndex, children: _screens), bottomNavigationBar: AppBottomNav( currentIndex: _currentIndex, onTap: (i) => setState(() => _currentIndex = i), ), ); } }