import 'package:flutter/material.dart'; import 'battle_screen.dart'; import 'inventory_screen.dart'; import 'settings_screen.dart'; import '../widgets/responsive_container.dart'; class MainWrapper extends StatefulWidget { const MainWrapper({super.key}); @override State createState() => _MainWrapperState(); } class _MainWrapperState extends State { int _currentIndex = 0; final List _screens = [ const BattleScreen(), const InventoryScreen(), const SettingsScreen(), ]; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, // Outer background for web body: Center( child: ResponsiveContainer( child: Scaffold( body: IndexedStack(index: _currentIndex, children: _screens), bottomNavigationBar: BottomNavigationBar( currentIndex: _currentIndex, onTap: (index) { setState(() { _currentIndex = index; }); }, items: const [ BottomNavigationBarItem( icon: Icon(Icons.flash_on), label: 'Battle', ), BottomNavigationBarItem( icon: Icon(Icons.backpack), label: 'Inventory', ), BottomNavigationBarItem( icon: Icon(Icons.settings), label: 'Settings', ), ], ), ), ), ), ); } }