63 lines
1.8 KiB
Dart
63 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rasadyar_core/core.dart';
|
|
|
|
import 'logic.dart';
|
|
|
|
class RootPage extends GetView<RootLogic> {
|
|
const RootPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
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,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|