Refactor: rename BottomNavigation and update TendersScreen structure
- Renamed BottomNavigation to TenderBottomNavigation for clarity. - Updated TendersScreen to use TenderBottomNavigation. - Converted TendersScreen from StatelessWidget to StatefulWidget to manage tab state. - Added TabController for handling tab changes and improved layout with SafeArea and PageView.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/constants/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
|
||||
class TabItem extends StatelessWidget {
|
||||
const TabItem({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.isActive,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final bool isActive;
|
||||
final VoidCallback onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Tab(
|
||||
child: SizedBox(
|
||||
width: 170.0.w(),
|
||||
child: Center(
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
color: isActive ? AppColors.mainBlue : AppColors.grey60,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user