Files
Regroup/lib/Common/CommonBottomNavigationBar.dart

314 lines
10 KiB
Dart
Raw Permalink Normal View History

2024-05-29 12:13:08 +05:30
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
2024-07-01 12:14:30 +05:30
import 'package:flutter_svg/flutter_svg.dart';
import 'package:glassmorphism_ui/glassmorphism_ui.dart';
2024-05-29 12:13:08 +05:30
import 'package:regroup/Common/controller/MainController.dart';
GlassContainer bottomnavigationbar(MainController _mainController) {
return GlassContainer(
2024-05-29 12:13:08 +05:30
width: double.infinity,
height: 100,
borderRadius: BorderRadius.circular(2),
2024-07-08 12:21:39 +05:30
blur: 2,
opacity: 0.2,
gradient: LinearGradient(
2024-05-29 12:13:08 +05:30
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFFFFFFF).withOpacity(0.4),
const Color(0xFFFFFFFF).withOpacity(0.5),
],
stops: const [
0.1,
1,
2024-05-29 12:13:08 +05:30
],
),
border: Border.all(color: const Color(0xff434A53)),
2024-05-29 12:13:08 +05:30
child: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
backgroundColor: const Color(0xFFFFFFFF).withOpacity(0),
showUnselectedLabels: true,
selectedItemColor: Colors.white,
unselectedItemColor: const Color(0xFF676767),
unselectedLabelStyle: TextStyle(
2024-07-02 12:59:03 +05:30
height: 3,
2024-05-29 12:13:08 +05:30
fontSize: 10.sp,
color: const Color(0xFF676767),
fontWeight: FontWeight.w400,
2024-07-01 12:14:30 +05:30
fontFamily: 'Helvetica'),
2024-05-29 12:13:08 +05:30
selectedLabelStyle: TextStyle(
fontSize: 10.sp,
color: const Color(0xFFFFFFFF),
fontWeight: FontWeight.w400,
2024-07-01 12:14:30 +05:30
fontFamily: 'Helvetica'),
2024-05-29 12:13:08 +05:30
currentIndex: _mainController.selectedIndex.value,
onTap: (index) {
_mainController.updateTab(index);
},
items: [
BottomNavigationBarItem(
2024-07-01 12:14:30 +05:30
icon: SvgPicture.asset(
2024-07-02 12:59:03 +05:30
'assets/images/png/unactiveHomeBottomBar.svg',
2024-07-01 12:14:30 +05:30
height: 25.h,
2024-07-02 12:59:03 +05:30
// width: 25.w,
2024-05-29 12:13:08 +05:30
),
activeIcon: Stack(
clipBehavior: Clip.none,
children: [
if (_mainController.selectedIndex.value == 0)
Container(
2024-07-02 12:59:03 +05:30
height: 25.h,
2024-05-29 12:13:08 +05:30
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
2024-07-02 12:59:03 +05:30
color: const Color(0xFFD90B2E).withOpacity(0.5),
2024-05-29 12:13:08 +05:30
spreadRadius: 15,
blurRadius: 25,
offset: const Offset(0, 10),
),
],
),
),
2024-07-01 12:14:30 +05:30
// Positioned(
// left: 0,
// right: 0,
// top: -15,
// child: Container(
// height: 2.h,
// width: 20.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10.r),
// color: const Color(0xFFD90B2E)),
// )),
2024-05-29 12:13:08 +05:30
Positioned(
top: 0,
bottom: 0,
right: 0,
left: 0,
child: Center(
2024-07-02 12:59:03 +05:30
child: Image.asset(
"assets/images/png/BottomBar/ActiveHome.png",
height: 30.h,
width: 30.w,
2024-05-29 12:13:08 +05:30
),
),
)
],
),
label: 'Community',
),
BottomNavigationBarItem(
2024-07-02 12:59:03 +05:30
icon: SvgPicture.asset(
'assets/images/png/BottomBar/groupBottomBarIcon.svg',
height: 25.h,
// width: 25.w,
2024-05-29 12:13:08 +05:30
),
activeIcon: Stack(
clipBehavior: Clip.none,
children: [
if (_mainController.selectedIndex.value == 1)
Container(
2024-07-02 12:59:03 +05:30
height: 25.h,
2024-05-29 12:13:08 +05:30
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
2024-07-02 12:59:03 +05:30
color: const Color(0xFFD90B2E).withOpacity(0.5),
2024-05-29 12:13:08 +05:30
spreadRadius: 15,
blurRadius: 25,
offset: const Offset(0, 10),
),
],
),
),
2024-07-02 12:59:03 +05:30
// Positioned(
// left: 0,
// right: 0,
// //top: -20,
// child: Container(
// height: 2.h,
// // width: 10.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10.r),
// color: const Color(0xFFD90B2E)),
// )),
2024-05-29 12:13:08 +05:30
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Center(
child: Image.asset(
2024-06-05 11:52:59 +05:30
'assets/images/png/BottomBar/activeGroup.png',
2024-05-29 12:13:08 +05:30
height: 30.h,
width: 30.w,
),
)),
],
),
// SvgPicture.asset('assets/image/svg/active_shortTrade.svg'),
label: 'Group',
),
BottomNavigationBarItem(
icon: Image.asset(
'assets/images/png/BottomBar/inactiveCal.png',
2024-07-03 20:15:25 +05:30
height: 22.h,
width: 22.w,
2024-05-29 12:13:08 +05:30
),
activeIcon: Stack(
clipBehavior: Clip.none,
children: [
if (_mainController.selectedIndex.value == 2)
Container(
2024-07-02 12:59:03 +05:30
height: 25.h,
2024-05-29 12:13:08 +05:30
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
2024-07-03 20:15:25 +05:30
color: const Color(0xFFD90B2E).withOpacity(0.5),
2024-05-29 12:13:08 +05:30
spreadRadius: 15,
blurRadius: 25,
offset: const Offset(0, 10),
),
],
),
),
2024-07-02 12:59:03 +05:30
// Positioned(
// left: 0,
// right: 0,
// top: -15,
// child: Container(
// height: 2.h,
// width: 20.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10.r),
// color: const Color(0xFFD90B2E)),
// )),
2024-05-29 12:13:08 +05:30
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Center(
child: Image.asset(
2024-06-05 11:52:59 +05:30
'assets/images/png/BottomBar/ActiveCal.png',
2024-07-02 12:59:03 +05:30
height: 30.h,
width: 30.w,
2024-05-29 12:13:08 +05:30
),
))
],
),
2024-07-09 13:10:40 +05:30
label: 'Calendar',
2024-05-29 12:13:08 +05:30
),
BottomNavigationBarItem(
icon: Image.asset(
'assets/images/png/BottomBar/inactiveChat.png',
2024-07-02 12:59:03 +05:30
height: 25.h,
2024-05-29 12:13:08 +05:30
),
activeIcon: Stack(
clipBehavior: Clip.none,
children: [
if (_mainController.selectedIndex.value == 3)
Container(
2024-07-02 12:59:03 +05:30
height: 25.h,
2024-05-29 12:13:08 +05:30
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
2024-07-03 20:15:25 +05:30
color: const Color(0xFFD90B2E).withOpacity(0.5),
2024-05-29 12:13:08 +05:30
spreadRadius: 15,
blurRadius: 25,
offset: const Offset(0, 10),
),
],
),
),
2024-07-02 12:59:03 +05:30
// Positioned(
// left: 0,
// right: 0,
// top: -15,
// child: Container(
// height: 2.h,
// width: 20.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10.r),
// color: const Color(0xFFD90B2E)),
// )),
2024-05-29 12:13:08 +05:30
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Center(
child: Image.asset(
2024-06-05 11:52:59 +05:30
'assets/images/png/BottomBar/ActiveChat.png',
2024-07-02 12:59:03 +05:30
height: 30.h,
width: 30.w,
2024-05-29 12:13:08 +05:30
),
))
],
),
// SvgPicture.asset('assets/image/svg/active_shortTrade.svg'),
label: 'Chats',
),
BottomNavigationBarItem(
icon: Image.asset(
'assets/images/png/BottomBar/inactivePeople.png',
2024-07-03 20:15:25 +05:30
height: 22.h,
width: 22.w,
2024-05-29 12:13:08 +05:30
),
activeIcon: Stack(
clipBehavior: Clip.none,
children: [
if (_mainController.selectedIndex.value == 4)
Container(
2024-07-02 12:59:03 +05:30
height: 25.h,
2024-05-29 12:13:08 +05:30
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
2024-07-03 20:15:25 +05:30
color: const Color(0xFFD90B2E).withOpacity(0.5),
2024-05-29 12:13:08 +05:30
spreadRadius: 15,
blurRadius: 25,
offset: const Offset(0, 10),
),
],
),
),
2024-07-02 12:59:03 +05:30
// Positioned(
// left: 0,
// right: 0,
// top: -15,
// child: Container(
// height: 2.h,
// width: 20.w,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10.r),
// color: const Color(0xFFD90B2E)),
// )),
2024-05-29 12:13:08 +05:30
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Center(
child: Image.asset(
2024-06-28 19:11:00 +05:30
'assets/images/png/BottomBar/activePeople.png',
2024-05-29 12:13:08 +05:30
height: 30.h,
width: 30.w,
),
))
],
),
// SvgPicture.asset('assets/image/svg/active_protfolio.svg'),
label: 'Profile',
),
],
),
);
}