import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../core/theme/app_colors.dart'; class MobileScaffold extends ConsumerWidget { final Widget child; final int currentIndex; final Function(int) onIndexChanged; const MobileScaffold({ super.key, required this.child, required this.currentIndex, required this.onIndexChanged, }); @override Widget build(BuildContext context, WidgetRef ref) { return Scaffold( extendBody: true, // Allow content behind nav bar if transparent backgroundColor: AppColors.background, body: child, bottomNavigationBar: Container( decoration: BoxDecoration( border: Border(top: BorderSide(color: AppColors.border.withOpacity(0.5), width: 0.5)), ), child: BottomNavigationBar( currentIndex: currentIndex, onTap: onIndexChanged, backgroundColor: AppColors.surface.withOpacity(0.95), // Highly opaque for readability type: BottomNavigationBarType.fixed, showSelectedLabels: true, showUnselectedLabels: true, items: const [ BottomNavigationBarItem( icon: Icon(Icons.tv), label: 'Live', ), BottomNavigationBarItem( icon: Icon(Icons.movie_outlined), activeIcon: Icon(Icons.movie), label: 'Movies', ), BottomNavigationBarItem( icon: Icon(Icons.video_library_outlined), activeIcon: Icon(Icons.video_library), label: 'Series', ), BottomNavigationBarItem( icon: Icon(Icons.settings_outlined), activeIcon: Icon(Icons.settings), label: 'Settings', ), ], ), ), ); } }