1-fake location
2-bottom navigation
3-bottom sheet
4-lazy map loading
This commit is contained in:
2025-04-12 18:07:36 +03:30
parent 39578bcff3
commit 503dcd91b8
52 changed files with 5435 additions and 121 deletions

View File

@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:supervision/presentation/filter/view.dart';
class RootLogic extends GetxController {
RxInt currentIndex = 0.obs;
List<Widget> pages = [
SupervisionFilterPage(),
Placeholder(color: Colors.red),
Placeholder(color: Colors.amber),
];
@override
void onReady() {
// TODO: implement 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,
),
),
],
),
);
}
}