feat: new pages and with binding ...

This commit is contained in:
2025-05-21 09:04:21 +03:30
parent 7f72f2c70d
commit ed75da4eaa
10 changed files with 84 additions and 13 deletions

View File

@@ -1,8 +1,13 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_livestock/presentation/page/action/view.dart';
import 'package:rasadyar_livestock/presentation/page/map/view.dart';
import 'package:rasadyar_livestock/presentation/page/profile/view.dart';
class RootLogic extends GetxController {
List<Widget> pages = [ActionPage(), MapPage(), ProfilePage()];
RxInt indexedPage = 1.obs;
@override
void onReady() {
// TODO: implement onReady

View File

@@ -7,6 +7,14 @@ class RootPage extends GetView<RootLogic> {
@override
Widget build(BuildContext context) {
return Container();
return Scaffold(
body: ObxValue((data) {
return IndexedStack(
children: controller.pages,
index: data.value,
sizing: StackFit.expand,
);
}, controller.indexedPage),
);
}
}