chore : change package supervision to inspection

This commit is contained in:
2025-04-22 15:51:05 +03:30
parent a45c0807d1
commit 1ad180d0b6
32 changed files with 121 additions and 127 deletions

View File

@@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart';
import 'package:inspection/presentation/action/view.dart';
import 'package:inspection/presentation/filter/view.dart';
import 'package:inspection/presentation/profile/view.dart';
class RootLogic extends GetxController {
RxInt currentIndex = 0.obs;
List<Widget> pages = [SupervisionFilterPage(), ActionPage(), ProfilePage()];
@override
void onReady() {
super.onReady();
}
void changePage(int index) {
currentIndex.value = index;
}
@override
void onClose() {
// TODO: implement onClose
super.onClose();
}
}

View File

@@ -0,0 +1,62 @@
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,
),
),
],
),
);
}
}