Merge branch 'feature/scrolled_bottom_navigation' into develop
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_core/data/utils.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -11,48 +12,40 @@ class RootPage extends GetView<RootLogic> {
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
ObxValue(
|
||||
(currentIndex) => IndexedStack(
|
||||
index: currentIndex.value,
|
||||
children: controller.pages,
|
||||
),
|
||||
controller.currentIndex,
|
||||
),
|
||||
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: ObxValue(
|
||||
(index) => BottomNavigation1(
|
||||
items: [
|
||||
BottomNavigation1Item(
|
||||
icon: Assets.vecMapSvg,
|
||||
label: 'نقشه',
|
||||
isSelected: controller.currentIndex.value == 0,
|
||||
onTap: () {
|
||||
controller.changePage(0);
|
||||
},
|
||||
),
|
||||
BottomNavigation1Item(
|
||||
icon: Assets.vecSettingSvg,
|
||||
label: 'اقدام',
|
||||
isSelected: controller.currentIndex.value == 1,
|
||||
onTap: () {
|
||||
controller.changePage(1);
|
||||
},
|
||||
),
|
||||
BottomNavigation1Item(
|
||||
icon: Assets.vecProfileCircleSvg,
|
||||
label: 'پروفایل',
|
||||
isSelected: controller.currentIndex.value == 2,
|
||||
onTap: () {
|
||||
controller.changePage(2);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
controller.currentIndex,
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: WaveBottomNavigation(
|
||||
items: [
|
||||
WaveBottomNavigationItem(
|
||||
title: 'خانه',
|
||||
icon:Assets.vecMapSvg,
|
||||
),
|
||||
WaveBottomNavigationItem(
|
||||
title: 'عملیات',
|
||||
icon:Assets.vecUserSvg,
|
||||
),
|
||||
WaveBottomNavigationItem(
|
||||
title: 'افزودن',
|
||||
icon:Assets.vecAddSvg,
|
||||
),
|
||||
WaveBottomNavigationItem(
|
||||
title: 'آمار',
|
||||
icon:Assets.vecDiagramSvg,
|
||||
), WaveBottomNavigationItem(
|
||||
title: 'تماس',
|
||||
icon:Assets.vecCallSvg,
|
||||
), WaveBottomNavigationItem(
|
||||
title: 'مکان ',
|
||||
icon:Assets.vecGpsSvg,
|
||||
), WaveBottomNavigationItem(
|
||||
title: 'تاریخ',
|
||||
icon:Assets.vecCalendarSvg,
|
||||
),
|
||||
],
|
||||
onPageChanged: (index) {
|
||||
controller.changePage(index);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user