folder structure created
This commit is contained in:
@@ -1,251 +1,97 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:tanami_app/features/Home/presentation/pages/MainScreen.dart';
|
||||
import 'package:tanami_app/features/MainScreens/MainScreen.dart';
|
||||
|
||||
Container bottomnavigationbar(selectedIndex) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: 83.h,
|
||||
color: Colors.white,
|
||||
alignment: Alignment.center,
|
||||
child: BottomNavigationBar(
|
||||
// backgroundColor: ,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: const Color(0xFFFFFFFF).withOpacity(0),
|
||||
showUnselectedLabels: true,
|
||||
selectedItemColor: Colors.white,
|
||||
unselectedItemColor: const Color(0xFF676767),
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(0xFF676767),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino'),
|
||||
selectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(0xFFFFFFFF),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino'),
|
||||
currentIndex: selectedIndex,
|
||||
onTap: (index) {
|
||||
updateTab(index);
|
||||
},
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/InactiveHome.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
// Icon(
|
||||
// Icons.home,
|
||||
// color: Color(0xFF676767),
|
||||
// ),
|
||||
activeIcon: Stack(
|
||||
children: [
|
||||
if (selectedIndex == 0)
|
||||
Container(
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
left: 0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/sidemenu/activehome.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
// activeIcon: SvgPicture.asset('assets/image/svg/active_home.svg'),
|
||||
label: 'Wallet',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/portfolioinactive.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Stack(
|
||||
children: [
|
||||
if (selectedIndex == 1)
|
||||
Container(
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/sidemenu/activetrade.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
|
||||
// SvgPicture.asset('assets/image/svg/active_shortTrade.svg'),
|
||||
label: 'Portfolio',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/Investinactive.png',
|
||||
height: 24.h,
|
||||
width: 24.w,
|
||||
),
|
||||
activeIcon: Stack(
|
||||
children: [
|
||||
if (selectedIndex == 2)
|
||||
Container(
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/pastPerformanceactive.png',
|
||||
height: 28.h,
|
||||
width: 28.w,
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
|
||||
// SvgPicture.asset('assets/image/svg/active_shortTrade.svg'),
|
||||
label: 'Invest',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/academyinactive.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Stack(
|
||||
children: [
|
||||
if (selectedIndex == 3)
|
||||
Container(
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/sidemenu/activeprotfolio.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
|
||||
// SvgPicture.asset('assets/image/svg/active_protfolio.svg'),
|
||||
label: 'Academy',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/SettingInactive.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Stack(
|
||||
children: [
|
||||
if (selectedIndex == 3)
|
||||
Container(
|
||||
height: 40.h,
|
||||
width: 40.w,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.4),
|
||||
spreadRadius: 15,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/sidemenu/activeprotfolio.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
|
||||
// SvgPicture.asset('assets/image/svg/active_protfolio.svg'),
|
||||
label: 'Settings',
|
||||
),
|
||||
],
|
||||
Widget bottomnavigationbar(selectedIndex) {
|
||||
return BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
showUnselectedLabels: true,
|
||||
selectedItemColor: Color(0xFF0B8933),
|
||||
unselectedItemColor: const Color(0xFF676767),
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(0xFF676767),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino',
|
||||
),
|
||||
selectedLabelStyle: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(0xFF0B8933),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'hiragino',
|
||||
),
|
||||
currentIndex: selectedIndex,
|
||||
onTap: (index) {
|
||||
updateTab(index);
|
||||
},
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/wallet.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/wallet.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Wallet',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/portfolio.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/portfolio.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Portfolio',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/invest.png',
|
||||
height: 24.h,
|
||||
width: 24.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/invest.png',
|
||||
height: 28.h,
|
||||
width: 28.w,
|
||||
),
|
||||
|
||||
// SvgPicture.asset('assets/image/svg/active_shortTrade.svg'),
|
||||
label: 'Invest',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/academy.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/academy.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Academy',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset(
|
||||
'assets/images/bottom_bar/inactive/settings.png',
|
||||
height: 26.h,
|
||||
width: 26.w,
|
||||
),
|
||||
activeIcon: Image.asset(
|
||||
'assets/images/bottom_bar/active/settings.png',
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
),
|
||||
label: 'Settings',
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user