network manager and di added
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../core/utils/size_config.dart';
|
||||
|
||||
class TenderBottomNavigation extends StatefulWidget {
|
||||
const TenderBottomNavigation({super.key});
|
||||
|
||||
@override
|
||||
State<TenderBottomNavigation> createState() => _TenderBottomNavigationState();
|
||||
}
|
||||
|
||||
class _TenderBottomNavigationState extends State<TenderBottomNavigation> {
|
||||
int activeTab = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 72.0.h(),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFE3E3E3),
|
||||
border: Border.fromBorderSide(BorderSide(color: Color(0xFFE3E3E3))),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_bottomNavigationItem(
|
||||
text: 'Home',
|
||||
isActive: activeTab == 0,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
activeTab = 0;
|
||||
});
|
||||
},
|
||||
iconPath: 'assets/icons/home.svg',
|
||||
activeIconPath: 'assets/icons/homeActive.svg',
|
||||
),
|
||||
_bottomNavigationItem(
|
||||
text: 'Tenders',
|
||||
isActive: activeTab == 1,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
activeTab = 1;
|
||||
});
|
||||
},
|
||||
iconPath: 'assets/icons/task_square.svg',
|
||||
activeIconPath: 'assets/icons/task-square_active.svg',
|
||||
),
|
||||
_bottomNavigationItem(
|
||||
text: 'Profile',
|
||||
isActive: activeTab == 2,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
activeTab = 2;
|
||||
});
|
||||
},
|
||||
iconPath: 'assets/icons/profile-circle.svg',
|
||||
activeIconPath: 'assets/icons/profile-circle_active.svg',
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _bottomNavigationItem({
|
||||
required String text,
|
||||
required bool isActive,
|
||||
required VoidCallback onTap,
|
||||
required String iconPath,
|
||||
required String activeIconPath,
|
||||
}) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: SizedBox(
|
||||
width: 64.0.w(),
|
||||
height: 72.0.h(),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 12.0.h(), bottom: 14.0.h()),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SvgPicture.asset(isActive ? activeIconPath : iconPath),
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color: isActive ? Color(0xFF0164FF) : Color(0xFF777777),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user