import 'package:flutter/material.dart'; import '../utils/colors.dart'; import 'tab_item.dart'; class TabSection extends StatelessWidget { final int selectedTabIndex; final Function(int) onTabTap; const TabSection({super.key, required this.selectedTabIndex, required this.onTabTap, }); @override Widget build(BuildContext context) { return Column( children: [ Padding( padding: const EdgeInsets.symmetric(horizontal: 32.0, vertical: 8.0), child: Container( height: 58, decoration: BoxDecoration( color:Theme.of(context).brightness == Brightness.dark ? AppColors.darkCardColor: Colors.grey[200], // Background color for the container borderRadius: BorderRadius.circular(10.0), // Rounded corners ), padding: const EdgeInsets.all(4.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ TabItem( title: 'Trips', isSelected: selectedTabIndex == 0, onTap: () => onTabTap(0), ), // TabItem( // title: 'Upcoming', // isSelected: selectedTabIndex == 1, // onTap: () => onTabTap(1), // ), TabItem( title: 'Cancelled', isSelected: selectedTabIndex == 1, onTap: () => onTabTap(1), ), ], ), ), // Full-width light bottom line // Container( // height: 1, // Thickness of the full bottom line // width: double.infinity, // color: Colors.grey[300], // Light grey matching design // margin:const EdgeInsets.symmetric(horizontal: 8), // ), )], ); } }