import 'package:wanisdriver/utils/colors.dart'; import 'package:flutter/material.dart'; import 'tab_item_upcomming_section.dart'; class TabSectionUpCommingTrip extends StatelessWidget { final int selectedTabIndex; final Function(int) onTabTap; const TabSectionUpCommingTrip({ 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), // Space inside the rounded container child: Row( children: [ Expanded( child: TabItemUpcommingSection( title: 'Available pickups', isSelected: selectedTabIndex == 0, onTap: () => onTabTap(0), ), ), Expanded( child: TabItemUpcommingSection( title: 'My pickups', isSelected: selectedTabIndex == 1, onTap: () => onTabTap(1), ), ), ], ), ), ), const SizedBox(height: 10), ], ); } }