feat : sale in province / but out of province / out of province page
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/chicken.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/buys_out_of_province/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/view.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class RootPage extends GetView<RootLogic> {
|
||||
@@ -14,7 +14,40 @@ class RootPage extends GetView<RootLogic> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.bgLight,
|
||||
body: IndexedStack(
|
||||
children: controller.pages,
|
||||
children: [
|
||||
Navigator(
|
||||
key: controller.navigatorKeys[0],
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[0]),
|
||||
),
|
||||
Navigator(
|
||||
key: Get.nestedKey(1),
|
||||
onGenerateRoute: (settings) {
|
||||
Widget page;
|
||||
if (settings.name == ChickenRoutes.outOfProvince) {
|
||||
page = controller.pages[1];
|
||||
} else if (settings.name == ChickenRoutes.salesOutOfProvince) {
|
||||
page = SalesOutOfProvincePage();
|
||||
} else if (settings.name == ChickenRoutes.buysOutOfProvince) {
|
||||
page = BuysOutOfProvincePage();
|
||||
} else {
|
||||
page = controller.pages[1];
|
||||
}
|
||||
return GetPageRoute(page: () => page);
|
||||
},
|
||||
),
|
||||
Navigator(
|
||||
key: controller.navigatorKeys[2],
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
|
||||
),
|
||||
Navigator(
|
||||
key: controller.navigatorKeys[3],
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[3]),
|
||||
),
|
||||
Navigator(
|
||||
key: controller.navigatorKeys[4],
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[4]),
|
||||
),
|
||||
],
|
||||
index: data.value,
|
||||
),
|
||||
bottomNavigationBar: WaveBottomNavigation(
|
||||
@@ -62,11 +95,11 @@ class RootPage extends GetView<RootLogic> {
|
||||
),
|
||||
],
|
||||
onPageChanged: (index) {
|
||||
controller.changePage(index);
|
||||
controller.changePage(index);
|
||||
},
|
||||
),
|
||||
);
|
||||
},controller.currentPage);
|
||||
}, controller.currentPage);
|
||||
}
|
||||
|
||||
Container _todayShipmentWidget() {
|
||||
@@ -496,19 +529,19 @@ class RootPage extends GetView<RootLogic> {
|
||||
),
|
||||
child: model != null
|
||||
? Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 10,
|
||||
children: [
|
||||
Text(
|
||||
'اطلاعات ارسالی',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
buildRow('فروش و توزیع داخل استان (کیلوگرم)', model.stewardAllocationsWeight!.toInt().toString()),
|
||||
buildRow('فروش و توزیع خارج استان (کیلوگرم)', model.freeSalesWeight!.toInt().toString()),
|
||||
],
|
||||
)
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
spacing: 10,
|
||||
children: [
|
||||
Text(
|
||||
'اطلاعات ارسالی',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
buildRow('فروش و توزیع داخل استان (کیلوگرم)', model.stewardAllocationsWeight!.toInt().toString()),
|
||||
buildRow('فروش و توزیع خارج استان (کیلوگرم)', model.freeSalesWeight!.toInt().toString()),
|
||||
],
|
||||
)
|
||||
: const Center(child: CircularProgressIndicator()),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user