chore : home page separation
This commit is contained in:
17
packages/chicken/lib/presentation/pages/home/logic.dart
Normal file
17
packages/chicken/lib/presentation/pages/home/logic.dart
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
|
class HomeLogic extends GetxController {
|
||||||
|
@override
|
||||||
|
void onReady() {
|
||||||
|
|
||||||
|
super.onReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
|
||||||
|
super.onClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
703
packages/chicken/lib/presentation/pages/home/view.dart
Normal file
703
packages/chicken/lib/presentation/pages/home/view.dart
Normal file
@@ -0,0 +1,703 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.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/routes/routes.dart';
|
||||||
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
|
class HomePage extends GetView<HomeLogic> {
|
||||||
|
const HomePage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColor.bgLight,
|
||||||
|
appBar: RAppBar(
|
||||||
|
title: 'رصدطیور',
|
||||||
|
iconTitle: Assets.vec.chickenSvg.path,
|
||||||
|
titleTextStyle: AppFonts.yekan16Bold.copyWith(color: Colors.white),
|
||||||
|
centerTitle: true,
|
||||||
|
hasBack: false,
|
||||||
|
leading: Row(
|
||||||
|
children: [Text('مباشر', style: AppFonts.yekan16Bold.copyWith(color: Colors.white))],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
Card(
|
||||||
|
margin: EdgeInsetsGeometry.all(6),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
side: BorderSide(width: 0.50, color: const Color(0xFFA9A9A9)),
|
||||||
|
),
|
||||||
|
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
spacing: 8,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
image: DecorationImage(image: AssetImage(Assets.images.chicken.path), fit: BoxFit.cover),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'مرغ گرم',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyDarkActive),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
AnimatedRotation(
|
||||||
|
turns: 180,
|
||||||
|
duration: Duration(milliseconds: 3000),
|
||||||
|
child: Icon(CupertinoIcons.chevron_up, size: 18),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
_todayShipmentWidget(),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(0, 10, 0, 13),
|
||||||
|
child: Row(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: _informationLabelCard(
|
||||||
|
title: 'مانده انبار',
|
||||||
|
description: '2،225،256',
|
||||||
|
iconPath: Assets.vec.cubeSearchSvg.path,
|
||||||
|
iconColor: const Color(0xFF426060),
|
||||||
|
bgDescriptionColor: const Color(0xFFC7DFE0),
|
||||||
|
bgLabelColor: const Color(0xFFA5D1D2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: _informationLabelCard(
|
||||||
|
title: 'توزیع شده',
|
||||||
|
description: '2،225،256',
|
||||||
|
iconPath: Assets.vec.cubeRotateSvg.path,
|
||||||
|
iconColor: Color(0xFF5C4D64),
|
||||||
|
bgLabelColor: Color(0xFFC8B8D1),
|
||||||
|
bgDescriptionColor: Color(0xFFDAD4DD),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [Text('اطلاعات بارها', textAlign: TextAlign.right, style: AppFonts.yekan16)],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(0, 8, 0, 13),
|
||||||
|
child: Row(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: _informationLabelCard(
|
||||||
|
title: 'داخل استان',
|
||||||
|
description: '2،225،256',
|
||||||
|
iconPath: Assets.vec.a3dCubeSquareSvg.path,
|
||||||
|
iconColor: const Color(0xFF6C5D60),
|
||||||
|
bgDescriptionColor: const Color(0xFFEDDCE0),
|
||||||
|
bgLabelColor: const Color(0xFFDDC0C7),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: _informationLabelCard(
|
||||||
|
title: 'خارج استان',
|
||||||
|
description: '2،225،256',
|
||||||
|
iconPath: Assets.vec.cubeSearchSvg.path,
|
||||||
|
iconColor: Color(0xFF2D5FFF),
|
||||||
|
bgLabelColor: const Color(0xFFAFCBFF),
|
||||||
|
bgDescriptionColor: const Color(0xFFCEDFFF),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
children: [Text('اطلاعات توزیع', textAlign: TextAlign.right, style: AppFonts.yekan16)],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(0, 8, 0, 13),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: _informationIconCard(
|
||||||
|
title: 'توزیع داخل استان',
|
||||||
|
description: '2،225،256',
|
||||||
|
iconPath: Assets.vec.truckSvg.path,
|
||||||
|
iconColor: const Color.fromRGBO(85, 97, 93, 1),
|
||||||
|
bgDescriptionColor: const Color(0xFFE6FAF5),
|
||||||
|
bgLabelColor: const Color(0xFFB0EFDF),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: _informationIconCard(
|
||||||
|
title: 'توزیع خارج استان',
|
||||||
|
description: '2،225،256',
|
||||||
|
iconPath: Assets.vec.truckFastSvg.path,
|
||||||
|
iconColor: Color(0xFF647379),
|
||||||
|
bgDescriptionColor: const Color(0xFFEAEFFF),
|
||||||
|
bgLabelColor: const Color(0xFFD4DEFF),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: _informationIconCard(
|
||||||
|
title: 'قطعه بندی',
|
||||||
|
description: '2،225،256',
|
||||||
|
iconPath: Assets.vec.convertCubeSvg.path,
|
||||||
|
iconColor: const Color(0xFF6F6164),
|
||||||
|
bgDescriptionColor: const Color(0xFFEDDCE0),
|
||||||
|
bgLabelColor: const Color(0xFFE0BCC5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsetsGeometry.all(6),
|
||||||
|
child: Row(
|
||||||
|
children: [Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16)],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 70,
|
||||||
|
child: ListView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
physics: BouncingScrollPhysics(),
|
||||||
|
children: [
|
||||||
|
widelyUsed(
|
||||||
|
title: 'خرید خارج استان',
|
||||||
|
iconPath: Assets.vec.cubeSearchSvg.path,
|
||||||
|
onTap: () {
|
||||||
|
// Get.toNamed(ChickenRoutes.enteringTheWarehouse);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(width: 15),
|
||||||
|
widelyUsed(
|
||||||
|
title: 'عمده فروشی',
|
||||||
|
iconPath: Assets.vec.truckFastSvg.path,
|
||||||
|
onTap: () {
|
||||||
|
//Get.toNamed(ChickenRoutes.salesWithinProvince);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(width: 15),
|
||||||
|
widelyUsed(
|
||||||
|
title: 'ثبت قطعه بندی',
|
||||||
|
iconPath: Assets.vec.convertCubeSvg.path,
|
||||||
|
onTap: () {
|
||||||
|
// Get.toNamed(ChickenRoutes.salesWithOutProvince);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(width: 15),
|
||||||
|
addWidelyUsed(onTap: () {}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Container _todayShipmentWidget() {
|
||||||
|
return Container(
|
||||||
|
height: 70,
|
||||||
|
width: Get.width / 2,
|
||||||
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [const Color(0xFFEAEFFF), Colors.white],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Assets.icons.cubeScan.svg(width: 30, height: 30),
|
||||||
|
Text(
|
||||||
|
'بارهای امروز',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'2،225،256',
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16.copyWith(color: AppColor.textColor),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'کیلوگرم',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.textColor),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Container _informationLabelCard({
|
||||||
|
required String title,
|
||||||
|
required String description,
|
||||||
|
String unit = 'کیلوگرم',
|
||||||
|
required String iconPath,
|
||||||
|
required Color iconColor,
|
||||||
|
required Color bgDescriptionColor,
|
||||||
|
required Color bgLabelColor,
|
||||||
|
}) {
|
||||||
|
return Container(
|
||||||
|
height: 82,
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)),
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
// Left side with icon and title
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
height: 82,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: bgLabelColor,
|
||||||
|
borderRadius: BorderRadius.only(topRight: Radius.circular(8), bottomRight: Radius.circular(8)),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
SvgGenImage.vec(
|
||||||
|
iconPath,
|
||||||
|
).svg(width: 24, height: 24, colorFilter: ColorFilter.mode(iconColor, BlendMode.srcIn)),
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Right side with description and unit
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: bgDescriptionColor,
|
||||||
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(8), bottomLeft: Radius.circular(8)),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
description,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
unit,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Container _informationIconCard({
|
||||||
|
required String title,
|
||||||
|
required String description,
|
||||||
|
String unit = 'کیلوگرم',
|
||||||
|
required String iconPath,
|
||||||
|
required Color iconColor,
|
||||||
|
required Color bgDescriptionColor,
|
||||||
|
required Color bgLabelColor,
|
||||||
|
}) {
|
||||||
|
return Container(
|
||||||
|
height: 110,
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)),
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
children: [
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
right: 0,
|
||||||
|
left: 0,
|
||||||
|
child: Container(
|
||||||
|
height: 91,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: bgDescriptionColor,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(width: 0.25, color: const Color(0xFFB4B4B4)),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
description,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
unit,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
child: Container(
|
||||||
|
width: 32,
|
||||||
|
height: 32,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: bgLabelColor,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
side: BorderSide(width: 0.25, color: const Color(0xFFD5D5D5)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: SvgGenImage.vec(
|
||||||
|
iconPath,
|
||||||
|
).svg(width: 24, height: 24, colorFilter: ColorFilter.mode(iconColor, BlendMode.srcIn)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget widelyUsed({required String title, required String iconPath, required VoidCallback onTap}) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
padding: EdgeInsets.all(4),
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: const Color(0xFFBECDFF),
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: AppColor.blueNormal,
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
|
),
|
||||||
|
child: SvgGenImage.vec(iconPath).svg(
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(title, style: AppFonts.yekan10.copyWith(color: AppColor.blueNormal)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget addWidelyUsed({required VoidCallback onTap}) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
padding: EdgeInsets.all(4),
|
||||||
|
decoration: ShapeDecoration(
|
||||||
|
color: const Color(0xFFD9F7F0),
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
|
),
|
||||||
|
child: Assets.vec.messageAddSvg.svg(
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
colorFilter: ColorFilter.mode(AppColor.greenNormal, BlendMode.srcIn),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text('افزودن', style: AppFonts.yekan10.copyWith(color: AppColor.greenDarkHover)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Column oldPage() {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
inventoryWidget(),
|
||||||
|
ObxValue((data) => broadcastInformationWidget(data.value), controller.killHouseDistributionInfo),
|
||||||
|
SizedBox(height: 20),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
cardWidget(
|
||||||
|
title: 'ورود به انبار',
|
||||||
|
iconPath: Assets.icons.whareHouse.path,
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(ChickenRoutes.enteringTheWarehouse);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
cardWidget(
|
||||||
|
title: 'فروش داخل استان',
|
||||||
|
iconPath: Assets.icons.inside.path,
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(ChickenRoutes.salesInProvince);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
cardWidget(
|
||||||
|
title: 'فروش خارج استان',
|
||||||
|
iconPath: Assets.icons.outside.path,
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(ChickenRoutes.salesOutOfProvince);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget inventoryWidget() {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Text('موجودی انبار', style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal)),
|
||||||
|
),
|
||||||
|
SizedBox(height: 4),
|
||||||
|
ObxValue(
|
||||||
|
(data) => data.isEmpty
|
||||||
|
? Container(
|
||||||
|
margin: const EdgeInsets.symmetric(vertical: 2),
|
||||||
|
height: 80,
|
||||||
|
padding: EdgeInsets.all(6),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: AppColor.blueNormal, width: 1),
|
||||||
|
),
|
||||||
|
child: Center(child: CircularProgressIndicator()),
|
||||||
|
)
|
||||||
|
: ListView.separated(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: controller.inventoryList.length,
|
||||||
|
separatorBuilder: (context, index) => const SizedBox(height: 8),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return ObxValue((expand) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.toggleExpanded(index);
|
||||||
|
},
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
child: AnimatedContainer(
|
||||||
|
onEnd: () {
|
||||||
|
controller.inventoryExpandedList[index] = !controller.inventoryExpandedList[index]!;
|
||||||
|
},
|
||||||
|
margin: const EdgeInsets.symmetric(vertical: 2),
|
||||||
|
padding: EdgeInsets.all(6),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: AppColor.blueNormal, width: 1),
|
||||||
|
),
|
||||||
|
duration: const Duration(seconds: 1),
|
||||||
|
height: expand.keys.contains(index) ? 250 : 80,
|
||||||
|
child: inventoryItem(
|
||||||
|
isExpanded: expand.keys.contains(index) && expand[index]!,
|
||||||
|
index: index,
|
||||||
|
model: controller.inventoryList[index],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.inventoryExpandedList);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
controller.inventoryList,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
Widget inventoryItem({required bool isExpanded, required int index, required InventoryModel model}) {
|
||||||
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
buildRow('نام محصول', model.name ?? ''),
|
||||||
|
Visibility(
|
||||||
|
visible: isExpanded,
|
||||||
|
child: Column(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
buildRow('وزن خریدهای دولتی داخل استان (کیلوگرم)', '0326598653'),
|
||||||
|
buildRow('وزن خریدهای آزاد داخل استان (کیلوگرم)', model.receiveFreeCarcassesWeight.toString()),
|
||||||
|
buildRow('وزن خریدهای خارج استان (کیلوگرم)', model.freeBuyingCarcassesWeight.toString()),
|
||||||
|
buildRow('کل ورودی به انبار (کیلوگرم)', model.totalFreeBarsCarcassesWeight.toString()),
|
||||||
|
buildRow('کل فروش (کیلوگرم)', model.realAllocatedWeight.toString()),
|
||||||
|
buildRow('مانده انبار (کیلوگرم)', model.totalRemainWeight.toString()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildRow(String title, String value) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Flexible(
|
||||||
|
flex: 2,
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Flexible(
|
||||||
|
flex: 1,
|
||||||
|
child: Text(
|
||||||
|
value,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget broadcastInformationWidget(KillHouseDistributionInfo? model) {
|
||||||
|
return Container(
|
||||||
|
height: 140,
|
||||||
|
margin: const EdgeInsets.all(8),
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: AppColor.blueNormal, width: 1),
|
||||||
|
),
|
||||||
|
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()),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: const Center(child: CircularProgressIndicator()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget cardWidget({required String title, required String iconPath, required VoidCallback onTap}) {
|
||||||
|
return Container(
|
||||||
|
width: Get.width / 4,
|
||||||
|
height: 130,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: onTap,
|
||||||
|
child: Card(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
side: BorderSide(width: 1, color: AppColor.blueNormal),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SvgGenImage(iconPath).svg(width: 50, height: 50),
|
||||||
|
SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart' show Text, EdgeInsets, Colors;
|
import 'package:flutter/material.dart' show Text, EdgeInsets, Colors;
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:rasadyar_auth/data/models/local/user_local/user_local_model.dart';
|
import 'package:rasadyar_auth/data/models/local/user_local/user_local_model.dart';
|
||||||
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
|
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
|
||||||
import 'package:rasadyar_auth/data/utils/safe_call.dart';
|
import 'package:rasadyar_auth/data/utils/safe_call.dart';
|
||||||
@@ -7,11 +8,22 @@ import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.
|
|||||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||||
import 'package:rasadyar_chicken/data/repositories/chicken_repository.dart';
|
import 'package:rasadyar_chicken/data/repositories/chicken_repository.dart';
|
||||||
import 'package:rasadyar_chicken/data/repositories/chicken_repository_imp.dart';
|
import 'package:rasadyar_chicken/data/repositories/chicken_repository_imp.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/pages/home/view.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/pages/sales_out_of_province/view.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
|
|
||||||
enum ErrorLocationType { serviceDisabled, permissionDenied, none }
|
enum ErrorLocationType { serviceDisabled, permissionDenied, none }
|
||||||
|
|
||||||
class RootLogic extends GetxController {
|
class RootLogic extends GetxController {
|
||||||
|
RxInt currentPage = 2.obs;
|
||||||
|
List<Widget> pages = [
|
||||||
|
Container(color: Colors.red),
|
||||||
|
SalesOutOfProvincePage(),
|
||||||
|
HomePage(),
|
||||||
|
Container(color: Colors.blue),
|
||||||
|
Container(color: Colors.amber),
|
||||||
|
];
|
||||||
|
|
||||||
RxList<ErrorLocationType> errorLocationType = RxList();
|
RxList<ErrorLocationType> errorLocationType = RxList();
|
||||||
RxMap<int, dynamic> inventoryExpandedList = RxMap();
|
RxMap<int, dynamic> inventoryExpandedList = RxMap();
|
||||||
var tokenService = Get.find<TokenStorageService>();
|
var tokenService = Get.find<TokenStorageService>();
|
||||||
@@ -20,8 +32,7 @@ class RootLogic extends GetxController {
|
|||||||
RxInt count = 5.obs;
|
RxInt count = 5.obs;
|
||||||
|
|
||||||
RxList<InventoryModel> inventoryList = RxList();
|
RxList<InventoryModel> inventoryList = RxList();
|
||||||
Rxn<KillHouseDistributionInfo> killHouseDistributionInfo =
|
Rxn<KillHouseDistributionInfo> killHouseDistributionInfo = Rxn<KillHouseDistributionInfo>();
|
||||||
Rxn<KillHouseDistributionInfo>();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
@@ -43,9 +54,7 @@ class RootLogic extends GetxController {
|
|||||||
|
|
||||||
Future<void> getInventory() async {
|
Future<void> getInventory() async {
|
||||||
await safeCall<List<InventoryModel>?>(
|
await safeCall<List<InventoryModel>?>(
|
||||||
call: () async => await chickenRepository.getInventory(
|
call: () async => await chickenRepository.getInventory(token: tokenService.accessToken.value!),
|
||||||
token: tokenService.accessToken.value!,
|
|
||||||
),
|
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
iLog(result);
|
iLog(result);
|
||||||
@@ -71,9 +80,7 @@ class RootLogic extends GetxController {
|
|||||||
|
|
||||||
Future<void> getKillHouseDistributionInfo() async {
|
Future<void> getKillHouseDistributionInfo() async {
|
||||||
await safeCall<KillHouseDistributionInfo?>(
|
await safeCall<KillHouseDistributionInfo?>(
|
||||||
call: () async => await chickenRepository.getIKillHouseDistributionInfo(
|
call: () async => await chickenRepository.getIKillHouseDistributionInfo(token: tokenService.accessToken.value!),
|
||||||
token: tokenService.accessToken.value!,
|
|
||||||
),
|
|
||||||
onSuccess: (result) {
|
onSuccess: (result) {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
iLog(result);
|
iLog(result);
|
||||||
@@ -86,23 +93,15 @@ class RootLogic extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleGeneric(DioException error) {
|
void _handleGeneric(DioException error) {
|
||||||
Get.showSnackbar(
|
Get.showSnackbar(_errorSnackBar('اعتبار توکن شما منقضی شده است لطفا دوباره وارد شوید'));
|
||||||
_errorSnackBar('اعتبار توکن شما منقضی شده است لطفا دوباره وارد شوید'),
|
|
||||||
);
|
|
||||||
tokenService.deleteTokens();
|
tokenService.deleteTokens();
|
||||||
Get.offAllNamed(AuthPaths.auth, arguments: Module.chicken);
|
Get.offAllNamed(AuthPaths.auth, arguments: Module.chicken);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetSnackBar _errorSnackBar(String message) {
|
GetSnackBar _errorSnackBar(String message) {
|
||||||
return GetSnackBar(
|
return GetSnackBar(
|
||||||
titleText: Text(
|
titleText: Text('خطا', style: AppFonts.yekan14.copyWith(color: Colors.white)),
|
||||||
'خطا',
|
messageText: Text(message, style: AppFonts.yekan12.copyWith(color: Colors.white)),
|
||||||
style: AppFonts.yekan14.copyWith(color: Colors.white),
|
|
||||||
),
|
|
||||||
messageText: Text(
|
|
||||||
message,
|
|
||||||
style: AppFonts.yekan12.copyWith(color: Colors.white),
|
|
||||||
),
|
|
||||||
backgroundColor: AppColor.error,
|
backgroundColor: AppColor.error,
|
||||||
margin: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
margin: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
@@ -110,4 +109,8 @@ class RootLogic extends GetxController {
|
|||||||
snackPosition: SnackPosition.TOP,
|
snackPosition: SnackPosition.TOP,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void changePage(int index) {
|
||||||
|
currentPage.value = index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,265 +10,63 @@ class RootPage extends GetView<RootLogic> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return ObxValue((data) {
|
||||||
backgroundColor: AppColor.bgLight,
|
return Scaffold(
|
||||||
appBar: RAppBar(
|
backgroundColor: AppColor.bgLight,
|
||||||
title: 'رصدطیور',
|
body: IndexedStack(
|
||||||
iconTitle: Assets.vec.chickenSvg.path,
|
children: controller.pages,
|
||||||
titleTextStyle:AppFonts.yekan16Bold.copyWith(color: Colors.white),
|
index: data.value,
|
||||||
centerTitle: true,
|
),
|
||||||
hasBack: false,
|
bottomNavigationBar: WaveBottomNavigation(
|
||||||
leading: Row(children: [Text('مباشر', style: AppFonts.yekan16Bold.copyWith(color: Colors.white))]),
|
initPage: controller.currentPage.value,
|
||||||
),
|
items: [
|
||||||
body: Column(
|
WaveBottomNavigationItem(
|
||||||
spacing: 8,
|
title: 'بارها',
|
||||||
children: [
|
icon: Assets.vec.truckFastSvg.svg(
|
||||||
Card(
|
width: 32,
|
||||||
margin: EdgeInsetsGeometry.all(6),
|
height: 32,
|
||||||
shape: RoundedRectangleBorder(
|
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
side: BorderSide(width: 0.50, color: const Color(0xFFA9A9A9)),
|
|
||||||
),
|
|
||||||
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(8.0),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
spacing: 8,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 40,
|
|
||||||
height: 40,
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
image: DecorationImage(image: AssetImage(Assets.images.chicken.path), fit: BoxFit.cover),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'مرغ گرم',
|
|
||||||
textAlign: TextAlign.right,
|
|
||||||
style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyDarkActive),
|
|
||||||
),
|
|
||||||
Spacer(),
|
|
||||||
AnimatedRotation(
|
|
||||||
turns: 180,
|
|
||||||
duration: Duration(milliseconds: 3000),
|
|
||||||
child: Icon(CupertinoIcons.chevron_up, size: 18),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 8),
|
|
||||||
_todayShipmentWidget(),
|
|
||||||
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 10, 0, 13),
|
|
||||||
child: Row(
|
|
||||||
spacing: 8,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: _informationLabelCard(
|
|
||||||
title: 'مانده انبار',
|
|
||||||
description: '2،225،256',
|
|
||||||
iconPath: Assets.vec.cubeSearchSvg.path,
|
|
||||||
iconColor: const Color(0xFF426060),
|
|
||||||
bgDescriptionColor: const Color(0xFFC7DFE0),
|
|
||||||
bgLabelColor: const Color(0xFFA5D1D2),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: _informationLabelCard(
|
|
||||||
title: 'توزیع شده',
|
|
||||||
description: '2،225،256',
|
|
||||||
iconPath: Assets.vec.cubeRotateSvg.path,
|
|
||||||
iconColor: Color(0xFF5C4D64),
|
|
||||||
bgLabelColor: Color(0xFFC8B8D1),
|
|
||||||
bgDescriptionColor: Color(0xFFDAD4DD),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Row(
|
|
||||||
children: [Text('اطلاعات بارها', textAlign: TextAlign.right, style: AppFonts.yekan16)],
|
|
||||||
),
|
|
||||||
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 13),
|
|
||||||
child: Row(
|
|
||||||
spacing: 8,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: _informationLabelCard(
|
|
||||||
title: 'داخل استان',
|
|
||||||
description: '2،225،256',
|
|
||||||
iconPath: Assets.vec.a3dCubeSquareSvg.path,
|
|
||||||
iconColor: const Color(0xFF6C5D60),
|
|
||||||
bgDescriptionColor: const Color(0xFFEDDCE0),
|
|
||||||
bgLabelColor: const Color(0xFFDDC0C7),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: _informationLabelCard(
|
|
||||||
title: 'خارج استان',
|
|
||||||
description: '2،225،256',
|
|
||||||
iconPath: Assets.vec.cubeSearchSvg.path,
|
|
||||||
iconColor: Color(0xFF2D5FFF),
|
|
||||||
bgLabelColor: const Color(0xFFAFCBFF),
|
|
||||||
bgDescriptionColor: const Color(0xFFCEDFFF),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Row(
|
|
||||||
children: [Text('اطلاعات توزیع', textAlign: TextAlign.right, style: AppFonts.yekan16)],
|
|
||||||
),
|
|
||||||
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 13),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
spacing: 8,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: _informationIconCard(
|
|
||||||
title: 'توزیع داخل استان',
|
|
||||||
description: '2،225،256',
|
|
||||||
iconPath: Assets.vec.truckSvg.path,
|
|
||||||
iconColor: const Color.fromRGBO(85, 97, 93, 1),
|
|
||||||
bgDescriptionColor: const Color(0xFFE6FAF5),
|
|
||||||
bgLabelColor: const Color(0xFFB0EFDF),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: _informationIconCard(
|
|
||||||
title: 'توزیع خارج استان',
|
|
||||||
description: '2،225،256',
|
|
||||||
iconPath: Assets.vec.truckFastSvg.path,
|
|
||||||
iconColor: Color(0xFF647379),
|
|
||||||
bgDescriptionColor: const Color(0xFFEAEFFF),
|
|
||||||
bgLabelColor: const Color(0xFFD4DEFF),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: _informationIconCard(
|
|
||||||
title: 'قطعه بندی',
|
|
||||||
description: '2،225،256',
|
|
||||||
iconPath: Assets.vec.convertCubeSvg.path,
|
|
||||||
iconColor: const Color(0xFF6F6164),
|
|
||||||
bgDescriptionColor: const Color(0xFFEDDCE0),
|
|
||||||
bgLabelColor: const Color(0xFFE0BCC5),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
WaveBottomNavigationItem(
|
||||||
|
title: 'خارج استان',
|
||||||
Padding(
|
icon: Assets.vec.cubeSearchSvg.svg(
|
||||||
padding: EdgeInsetsGeometry.all(6),
|
width: 32,
|
||||||
child: Row(
|
height: 32,
|
||||||
children: [Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16)],
|
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
WaveBottomNavigationItem(
|
||||||
|
title: 'خانه',
|
||||||
SizedBox(
|
icon: Assets.vec.homeSvg.svg(
|
||||||
height: 70,
|
width: 32,
|
||||||
child: ListView(
|
height: 32,
|
||||||
scrollDirection: Axis.horizontal,
|
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12),
|
),
|
||||||
physics: BouncingScrollPhysics(),
|
|
||||||
children: [
|
|
||||||
widelyUsed(
|
|
||||||
title: 'خرید خارج استان',
|
|
||||||
iconPath: Assets.vec.cubeSearchSvg.path,
|
|
||||||
onTap: () {
|
|
||||||
// Get.toNamed(ChickenRoutes.enteringTheWarehouse);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SizedBox(width: 15),
|
|
||||||
widelyUsed(
|
|
||||||
title: 'عمده فروشی',
|
|
||||||
iconPath: Assets.vec.truckFastSvg.path,
|
|
||||||
onTap: () {
|
|
||||||
//Get.toNamed(ChickenRoutes.salesWithinProvince);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SizedBox(width: 15),
|
|
||||||
widelyUsed(
|
|
||||||
title: 'ثبت قطعه بندی',
|
|
||||||
iconPath: Assets.vec.convertCubeSvg.path,
|
|
||||||
onTap: () {
|
|
||||||
// Get.toNamed(ChickenRoutes.salesWithOutProvince);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SizedBox(width: 15),
|
|
||||||
addWidelyUsed(onTap: () {}),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
WaveBottomNavigationItem(
|
||||||
],
|
title: 'قطعه بندی',
|
||||||
),
|
icon: Assets.vec.convertCubeSvg.svg(
|
||||||
bottomNavigationBar: WaveBottomNavigation(
|
width: 32,
|
||||||
initPage: 2,
|
height: 32,
|
||||||
items: [
|
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
WaveBottomNavigationItem(
|
),
|
||||||
title: 'بارها',
|
|
||||||
icon: Assets.vec.truckFastSvg.svg(
|
|
||||||
width: 32,
|
|
||||||
height: 32,
|
|
||||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
|
||||||
),
|
),
|
||||||
),
|
WaveBottomNavigationItem(
|
||||||
WaveBottomNavigationItem(
|
title: 'پروفایل',
|
||||||
title: 'خارج استان',
|
icon: Assets.vec.userSvg.svg(
|
||||||
icon: Assets.vec.cubeSearchSvg.svg(
|
width: 32,
|
||||||
width: 32,
|
height: 32,
|
||||||
height: 32,
|
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
WaveBottomNavigationItem(
|
onPageChanged: (index) {
|
||||||
title: 'خانه',
|
controller.changePage(index);
|
||||||
icon: Assets.vec.homeSvg.svg(
|
},
|
||||||
width: 32,
|
),
|
||||||
height: 32,
|
);
|
||||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
},controller.currentPage);
|
||||||
),
|
|
||||||
),
|
|
||||||
WaveBottomNavigationItem(
|
|
||||||
title: 'قطعه بندی',
|
|
||||||
icon: Assets.vec.convertCubeSvg.svg(
|
|
||||||
width: 32,
|
|
||||||
height: 32,
|
|
||||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
WaveBottomNavigationItem(
|
|
||||||
title: 'پروفایل',
|
|
||||||
icon: Assets.vec.userSvg.svg(
|
|
||||||
width: 32,
|
|
||||||
height: 32,
|
|
||||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
onPageChanged: (index) {
|
|
||||||
// controller.changePage(index);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Container _todayShipmentWidget() {
|
Container _todayShipmentWidget() {
|
||||||
@@ -579,54 +377,55 @@ class RootPage extends GetView<RootLogic> {
|
|||||||
),
|
),
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 4),
|
||||||
ObxValue(
|
ObxValue(
|
||||||
(data) => data.isEmpty
|
(data) =>
|
||||||
|
data.isEmpty
|
||||||
? Container(
|
? Container(
|
||||||
margin: const EdgeInsets.symmetric(vertical: 2),
|
margin: const EdgeInsets.symmetric(vertical: 2),
|
||||||
height: 80,
|
height: 80,
|
||||||
padding: EdgeInsets.all(6),
|
padding: EdgeInsets.all(6),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
border: Border.all(color: AppColor.blueNormal, width: 1),
|
border: Border.all(color: AppColor.blueNormal, width: 1),
|
||||||
),
|
),
|
||||||
child: Center(child: CircularProgressIndicator()),
|
child: Center(child: CircularProgressIndicator()),
|
||||||
)
|
)
|
||||||
: ListView.separated(
|
: ListView.separated(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
itemCount: controller.inventoryList.length,
|
itemCount: controller.inventoryList.length,
|
||||||
separatorBuilder: (context, index) => const SizedBox(height: 8),
|
separatorBuilder: (context, index) => const SizedBox(height: 8),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return ObxValue((expand) {
|
return ObxValue((expand) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
controller.toggleExpanded(index);
|
controller.toggleExpanded(index);
|
||||||
},
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
child: AnimatedContainer(
|
|
||||||
onEnd: () {
|
|
||||||
controller.inventoryExpandedList[index] = !controller.inventoryExpandedList[index]!;
|
|
||||||
},
|
|
||||||
margin: const EdgeInsets.symmetric(vertical: 2),
|
|
||||||
padding: EdgeInsets.all(6),
|
|
||||||
curve: Curves.easeInOut,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
border: Border.all(color: AppColor.blueNormal, width: 1),
|
|
||||||
),
|
|
||||||
duration: const Duration(seconds: 1),
|
|
||||||
height: expand.keys.contains(index) ? 250 : 80,
|
|
||||||
child: inventoryItem(
|
|
||||||
isExpanded: expand.keys.contains(index) && expand[index]!,
|
|
||||||
index: index,
|
|
||||||
model: controller.inventoryList[index],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}, controller.inventoryExpandedList);
|
|
||||||
},
|
},
|
||||||
),
|
behavior: HitTestBehavior.opaque,
|
||||||
|
child: AnimatedContainer(
|
||||||
|
onEnd: () {
|
||||||
|
controller.inventoryExpandedList[index] = !controller.inventoryExpandedList[index]!;
|
||||||
|
},
|
||||||
|
margin: const EdgeInsets.symmetric(vertical: 2),
|
||||||
|
padding: EdgeInsets.all(6),
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: AppColor.blueNormal, width: 1),
|
||||||
|
),
|
||||||
|
duration: const Duration(seconds: 1),
|
||||||
|
height: expand.keys.contains(index) ? 250 : 80,
|
||||||
|
child: inventoryItem(
|
||||||
|
isExpanded: expand.keys.contains(index) && expand[index]!,
|
||||||
|
index: index,
|
||||||
|
model: controller.inventoryList[index],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.inventoryExpandedList);
|
||||||
|
},
|
||||||
|
),
|
||||||
controller.inventoryList,
|
controller.inventoryList,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -697,205 +496,52 @@ class RootPage extends GetView<RootLogic> {
|
|||||||
),
|
),
|
||||||
child: model != null
|
child: model != null
|
||||||
? Column(
|
? Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
spacing: 10,
|
spacing: 10,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'اطلاعات ارسالی',
|
'اطلاعات ارسالی',
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
buildRow('فروش و توزیع داخل استان (کیلوگرم)', model.stewardAllocationsWeight!.toInt().toString()),
|
buildRow('فروش و توزیع داخل استان (کیلوگرم)', model.stewardAllocationsWeight!.toInt().toString()),
|
||||||
buildRow('فروش و توزیع خارج استان (کیلوگرم)', model.freeSalesWeight!.toInt().toString()),
|
buildRow('فروش و توزیع خارج استان (کیلوگرم)', model.freeSalesWeight!.toInt().toString()),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: const Center(child: CircularProgressIndicator()),
|
: const Center(child: CircularProgressIndicator()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Widget expandedContainer(bool isExpanded, VoidCallback onTap) {
|
Widget cardWidget({required String title, required String iconPath, required VoidCallback onTap}) {
|
||||||
return AnimatedContainer(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 30, vertical: 10),
|
width: Get.width / 4,
|
||||||
curve: Curves.easeInOut,
|
height: 130,
|
||||||
duration: Duration(seconds: 1),
|
child: GestureDetector(
|
||||||
height: isExpanded ? 364 : 80,
|
onTap: onTap,
|
||||||
child: markerDetailsWidget(ontap: onTap),
|
child: Card(
|
||||||
);
|
shape: RoundedRectangleBorder(
|
||||||
}
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
side: BorderSide(width: 1, color: AppColor.blueNormal),
|
||||||
Widget markerDetailsWidget({required VoidCallback ontap}) {
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: ontap,
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
child: Container(
|
|
||||||
clipBehavior: Clip.antiAlias,
|
|
||||||
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 0, vertical: 10),
|
|
||||||
decoration: ShapeDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
spacing: 15,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
spacing: 12,
|
|
||||||
children: [
|
|
||||||
vecWidgetWithOnTap(
|
|
||||||
child: Assets.vec.editSvg.svg(),
|
|
||||||
onTap: () {},
|
|
||||||
width: 24,
|
|
||||||
height: 24,
|
|
||||||
color: AppColor.blueNormal,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'سوابق بازرسی من',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
vecWidgetWithOnTap(
|
|
||||||
child: Assets.vec.trashSvg.svg(),
|
|
||||||
width: 24,
|
|
||||||
height: 24,
|
|
||||||
color: AppColor.redNormal,
|
|
||||||
onTap: () {},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
Container(
|
child: Padding(
|
||||||
height: 32,
|
padding: EdgeInsets.all(16),
|
||||||
clipBehavior: Clip.antiAlias,
|
child: Column(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
decoration: ShapeDecoration(
|
|
||||||
color: AppColor.blueLight,
|
|
||||||
shape: RoundedRectangleBorder(side: BorderSide(width: 1, color: AppColor.blueLightHover)),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'تاریخ بازرسی',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'1403/12/12',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'شماره همراه',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'0326598653',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'آخرین فعالیت',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
|
|
||||||
Text(
|
|
||||||
'1409/12/12',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'موجودی',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'5کیلوگرم',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
...List.generate(
|
|
||||||
5,
|
|
||||||
(index) => Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
|
SvgGenImage(iconPath).svg(width: 50, height: 50),
|
||||||
|
SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
'فروش رفته',
|
title,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'0 کیلوگرم',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget cardWidget({required String title, required String iconPath, required VoidCallback onTap}) {
|
|
||||||
return Container(
|
|
||||||
width: Get.width / 4,
|
|
||||||
height: 130,
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: onTap,
|
|
||||||
child: Card(
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
side: BorderSide(width: 1, color: AppColor.blueNormal),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.all(16),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
SvgGenImage(iconPath).svg(width: 50, height: 50),
|
|
||||||
SizedBox(height: 4),
|
|
||||||
Text(
|
|
||||||
title,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ class SalesOutOfProvincePage extends GetView<SalesOutOfProvinceLogic> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: RAppBar(
|
appBar: RAppBar(
|
||||||
title: 'فروش خارج استان',
|
title: 'رصدطیور',
|
||||||
|
iconTitle: Assets.vec.chickenSvg.path,
|
||||||
|
titleTextStyle:AppFonts.yekan16Bold.copyWith(color: Colors.white),
|
||||||
|
centerTitle: true,
|
||||||
|
hasBack: false,
|
||||||
|
leading: Row(children: [Text('مباشر', style: AppFonts.yekan16Bold.copyWith(color: Colors.white))]),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import 'package:rasadyar_auth/auth.dart';
|
import 'package:rasadyar_auth/auth.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/logic.dart';
|
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/view.dart';
|
import 'package:rasadyar_chicken/presentation/pages/entering_the_warehouse/view.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/pages/home/logic.dart';
|
||||||
|
import 'package:rasadyar_chicken/presentation/pages/home/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
|
import 'package:rasadyar_chicken/presentation/pages/root/logic.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/root/view.dart';
|
import 'package:rasadyar_chicken/presentation/pages/root/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/pages/sales_in_province/logic.dart';
|
import 'package:rasadyar_chicken/presentation/pages/sales_in_province/logic.dart';
|
||||||
@@ -20,6 +22,19 @@ sealed class ChickenPages {
|
|||||||
middlewares: [AuthMiddleware()],
|
middlewares: [AuthMiddleware()],
|
||||||
binding: BindingsBuilder(() {
|
binding: BindingsBuilder(() {
|
||||||
Get.put(RootLogic());
|
Get.put(RootLogic());
|
||||||
|
Get.lazyPut(()=>HomeLogic());
|
||||||
|
Get.lazyPut(()=>SalesInProvinceLogic());
|
||||||
|
Get.lazyPut(()=>SalesOutOfProvinceLogic());
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
|
||||||
|
GetPage(
|
||||||
|
name: ChickenRoutes.home,
|
||||||
|
page: () => HomePage(),
|
||||||
|
middlewares: [AuthMiddleware()],
|
||||||
|
binding: BindingsBuilder(() {
|
||||||
|
Get.put(HomeLogic());
|
||||||
|
Get.put(RootLogic());
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ sealed class ChickenRoutes {
|
|||||||
ChickenRoutes._();
|
ChickenRoutes._();
|
||||||
static const _base = '/init';
|
static const _base = '/init';
|
||||||
static const init = '$_base/init';
|
static const init = '$_base/init';
|
||||||
|
static const home = '$_base/home';
|
||||||
|
|
||||||
static const enteringTheWarehouse = '$_base/enteringTheWarehouse';
|
static const enteringTheWarehouse = '$_base/enteringTheWarehouse';
|
||||||
static const salesInProvince = '$_base/SalesInProvincePage';
|
static const salesInProvince = '$_base/SalesInProvincePage';
|
||||||
|
|||||||
Reference in New Issue
Block a user