feat: new pages and with binding ...
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user