refactor(diary): Compiled version apk: profile, settings, diarym registration, auth, navigation bar

This commit is contained in:
2024-04-10 17:07:56 +03:00
parent f4ddb7285c
commit bbbc20a15a
11 changed files with 164 additions and 133 deletions

View File

@@ -21,12 +21,12 @@ class CustomBottomBarState extends State<CustomBottomBar> {
title: "diary".tr,
type: BottomBarEnum.tf,
),
BottomMenuModel(
/*BottomMenuModel(
icon: ImageConstant.imgNavBlueGray400,
activeIcon: ImageConstant.imgNavBlueGray400,
title: "my_blog".tr,
type: BottomBarEnum.tf,
),
),*/
BottomMenuModel(
icon: ImageConstant.imgNavBlueGray40024x23,
activeIcon: ImageConstant.imgNavBlueGray40024x23,
@@ -34,9 +34,9 @@ class CustomBottomBarState extends State<CustomBottomBar> {
type: BottomBarEnum.tf,
),
BottomMenuModel(
icon: ImageConstant.imgNavPrimary,
activeIcon: ImageConstant.imgNavPrimary,
title: "admin".tr,
icon: ImageConstant.imgNavBlueGray40024x23,
activeIcon: ImageConstant.imgNavBlueGray40024x23,
title: "Настройки",
type: BottomBarEnum.tf,
),
BottomMenuModel(
@@ -72,12 +72,33 @@ class CustomBottomBarState extends State<CustomBottomBar> {
}
void changeMeny(index) {
selectedIndex = index;
widget.onChanged?.call(bottomMenuList[index].type);
setState(() {});
setState(() {
selectedIndex = index;
});
switch (index) {
case 0:
Navigator.pushNamed(context, AppRoutes.diaryEdit);
break;
/*case 1:
Navigator.pushNamed(context, '/my_blog');
break;*/
case 1:
Navigator.pushNamed(context, AppRoutes.myProfile);
break;
case 2:
Navigator.pushNamed(context, AppRoutes.mySettings);
break;
case 3:
Navigator.pushNamed(context, '/chat');
break;
default:
}
}
BottomNavigationBarItem bottomMenu(index) {
bool isSelected = selectedIndex == index;
return BottomNavigationBarItem(
icon: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@@ -86,14 +107,17 @@ class CustomBottomBarState extends State<CustomBottomBar> {
imagePath: bottomMenuList[index].icon,
height: 24.v,
width: 19.h,
color: appTheme.blueGray400,
color:
isSelected ? theme.colorScheme.primary : appTheme.blueGray400,
),
Padding(
padding: EdgeInsets.only(top: 8.v),
child: Text(
bottomMenuList[index].title ?? "",
style: CustomTextStyles.bodySmallMulishBluegray80012.copyWith(
color: appTheme.blueGray800,
color: isSelected
? theme.colorScheme.primary
: appTheme.blueGray800,
),
),
),