From c4bc31029f51b08ad88acd26d17ff88b110e9fd9 Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Tue, 18 Nov 2025 08:10:19 +0330 Subject: [PATCH] feat: add Poultry Farm Inspection module with navigation and logic --- android/local.properties | 2 +- .../presentation/pages/common/auth/logic.dart | 9 + .../presentation/pages/common/role/view.dart | 28 +- .../poultry_farm_inspection/home/logic.dart | 60 + .../poultry_farm_inspection/home/view.dart | 1073 +++++++++++++++++ .../poultry_farm_inspection.dart | 2 + .../poultry_farm_inspection/root/logic.dart | 44 + .../poultry_farm_inspection/root/view.dart | 58 + .../poultry_science/poultry_action/logic.dart | 6 + .../poultry_science/poultry_action/view.dart | 1 - .../lib/presentation/routes/pages.dart | 13 +- .../lib/presentation/routes/routes.dart | 4 + .../widget/info_card/info_card.dart | 36 + .../lib/presentation/common/app_color.dart | 437 +++++-- 14 files changed, 1638 insertions(+), 135 deletions(-) create mode 100644 packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/logic.dart create mode 100644 packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/view.dart create mode 100644 packages/chicken/lib/presentation/pages/poultry_farm_inspection/poultry_farm_inspection.dart create mode 100644 packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/logic.dart create mode 100644 packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/view.dart create mode 100644 packages/chicken/lib/presentation/widget/info_card/info_card.dart diff --git a/android/local.properties b/android/local.properties index 18ea619..8cd06f6 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,4 +1,4 @@ -sdk.dir=C:/Users/Housh11/AppData/Local/Android/Sdk +sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk flutter.sdk=C:\\src\\flutter flutter.buildMode=debug flutter.versionName=1.3.33 diff --git a/packages/chicken/lib/presentation/pages/common/auth/logic.dart b/packages/chicken/lib/presentation/pages/common/auth/logic.dart index feac081..17af2d5 100644 --- a/packages/chicken/lib/presentation/pages/common/auth/logic.dart +++ b/packages/chicken/lib/presentation/pages/common/auth/logic.dart @@ -122,6 +122,15 @@ class AuthLogic extends GetxController with GetTickerProviderStateMixin { var tmpRoles = result?.role ?.where((element) => element == 'PoultryScience' || element == 'Steward') .toList(); + + /*var tmpRoles = result?.role?.where((element) { + return element == 'PoultryScience' || + element == 'Steward' || + element == 'CityOperator' || + element == 'CityJahad' || + element.toLowerCase().contains("admin"); + }).toList();*/ + await tokenStorageService.saveRoles(_module, tmpRoles ?? []); if (rememberMe.value) { await tokenStorageService.saveUserPass( diff --git a/packages/chicken/lib/presentation/pages/common/role/view.dart b/packages/chicken/lib/presentation/pages/common/role/view.dart index d4c8f89..58b1b11 100644 --- a/packages/chicken/lib/presentation/pages/common/role/view.dart +++ b/packages/chicken/lib/presentation/pages/common/role/view.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:rasadyar_chicken/data/common/fa_user_role.dart'; -import 'package:rasadyar_chicken/presentation/widget/app_bar.dart'; import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; import 'package:rasadyar_core/core.dart'; @@ -15,11 +14,7 @@ class RolePage extends GetView { isBase: true, child: Column( children: [ - Assets.images.selectRole.image( - height: 212.h, - width: Get.width.w, - fit: BoxFit.cover, - ), + Assets.images.selectRole.image(height: 212.h, width: Get.width.w, fit: BoxFit.cover), ObxValue((data) { return Expanded( child: GridView.builder( @@ -38,15 +33,9 @@ class RolePage extends GetView { title: role.keys.first, onTap: () async { String route = role.values.first; - await controller.gService.saveRoute( - Module.chicken, - route, - ); + await controller.gService.saveRoute(Module.chicken, route); - await controller.gService.saveRole( - Module.chicken, - data[index], - ); + await controller.gService.saveRole(Module.chicken, data[index]); Get.offAllNamed(route); }, ); @@ -58,17 +47,9 @@ class RolePage extends GetView { ), ); } - - } - -Widget roleCard({ - required String title, - Function()? onTap, - int? width, - int? height, -}) { +Widget roleCard({required String title, Function()? onTap, int? width, int? height}) { return Container( width: width?.w ?? 128.w, height: height?.h ?? 48.h, @@ -84,6 +65,7 @@ Widget roleCard({ child: Text( title, style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal), + textAlign: TextAlign.center, ), ), ), diff --git a/packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/logic.dart b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/logic.dart new file mode 100644 index 0000000..4ae4728 --- /dev/null +++ b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/logic.dart @@ -0,0 +1,60 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_core/core.dart'; + +class PoultryFarmInspectionHomeLogic extends GetxController + with GetTickerProviderStateMixin { + RxInt selectedSegmentIndex = 0.obs; + RxList>> inspectionList = RxList([ + Resource>.success( + PaginationModel(results: ["s", "b", "c", "d"]), + ), + ]); + RxList>> inactiveInspectionList = RxList([ + Resource>.success( + PaginationModel(results: ["s", "b", "c", "d"]), + ), + ]); + + RxInt expandedIndex = RxInt(-1); + + late TabController tabController; + + RxInt selectedTabIndex = 0.obs; + + @override + void onInit() { + super.onInit(); + tabController = TabController(length: 4, vsync: this); + } + + @override + void onReady() { + // TODO: implement onReady + super.onReady(); + } + + @override + void onClose() { + // TODO: implement onClose + super.onClose(); + } + + void toggleExpanded(int index) { + expandedIndex.value = expandedIndex.value == index ? -1 : index; + } + + void changeSegmentIndex(int index) { + if (index == selectedSegmentIndex.value) { + return; + } + expandedIndex.value = -1; + selectedSegmentIndex.value = index; + } + + void changeTab(int index) { + if (index == selectedTabIndex.value) { + return; + } + selectedTabIndex.value = index; + } +} diff --git a/packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/view.dart b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/view.dart new file mode 100644 index 0000000..9262c0c --- /dev/null +++ b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/home/view.dart @@ -0,0 +1,1073 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart'; +import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; +import 'package:rasadyar_chicken/presentation/widget/info_card/info_card.dart'; +import 'package:rasadyar_core/core.dart'; + +import 'logic.dart'; + +class PoultryFarmInspectionHomePage + extends GetView { + const PoultryFarmInspectionHomePage({super.key}); + + @override + Widget build(BuildContext context) { + return ChickenBasePage( + onFilterTap: () { + //TODO + }, + + onSearchTap: () { + //TODO + }, + + onSearchChanged: (data) { + //TODO + }, + backId: poultryFirstKey, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + infoCards(), + segmentWidget(), + ObxValue((data) { + return data.value == 0 + ? activeInspectionWidget() + : inactiveInspectionWidget(); + }, controller.selectedSegmentIndex), + ], + ), + ); + } + + Padding infoCards() { + return Padding( + padding: const EdgeInsets.fromLTRB(9, 12, 7, 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + spacing: 8, + children: [ + cardInfo( + value: 2225256, + description: 'بازرسی شده', + color: const Color(0xFFB6DED8), + ), + cardInfo( + value: 2050, + description: 'بازرسی نشده', + color: const Color(0xFFE9CED7), + ), + cardInfo( + value: 2225256, + description: 'عملکرد مناسب', + color: const Color(0xFFCFE0FF), + ), + cardInfo( + value: 55225, + description: 'عملکرد ضعیف', + color: const Color(0xFFF3D6CB), + ), + ], + ), + ); + } + + Padding segmentWidget() { + return Padding( + padding: const EdgeInsets.fromLTRB(8, 0, 8, 8), + child: Row( + children: [ + Expanded( + child: RSegment( + children: ['بازرسی فعال', 'بایگانی'], + selectedIndex: 0, + borderColor: const Color(0xFFB4B4B4), + selectedBorderColor: AppColor.blueNormal, + selectedBackgroundColor: AppColor.blueLight, + onSegmentSelected: (index) => + controller.changeSegmentIndex(index), + backgroundColor: AppColor.whiteGreyNormal, + ), + ), + ], + ), + ); + } + + Widget activeInspectionWidget() { + return Expanded( + child: ObxValue((data) { + return RPaginatedListView( + listType: ListType.separated, + resource: data.first, + hasMore: false, + onLoadMore: () async {}, + padding: EdgeInsets.fromLTRB(8, 8, 8, 80), + itemBuilder: (context, index) { + return ObxValue((val) { + return ExpandableListItem2( + selected: val.value.isEqual(index), + onTap: () => controller.toggleExpanded(index), + index: index, + child: activeinspecitonItemListWidget(), + secondChild: avtiveInspectionItemListExpandedWidget(), + labelColor: AppColor.blueLight, + labelIcon: Assets.vec.checkSquareSvg.path, + labelIconColor: AppColor.mediumGreyDarkHover, + ); + }, controller.expandedIndex); + }, + itemCount: 2, + separatorBuilder: (context, index) => SizedBox(height: 8.h), + ); + }, controller.inspectionList), + ); + } + + Container avtiveInspectionItemListExpandedWidget() { + const farmerName = 'آرمان صادقی'; + const showViolationLabel = true; + const violationLabel = 'پیگیری'; + const breed = 'راس ۳۰۸'; + const ageInDays = '۴۲'; + const growPeriod = 'بهار ۱۴۰۴'; + const licenceNumber = '۱۲۳۴۵۶۷۸'; + const chickVolume = '۲۵,۰۰۰'; + const hallRemain = '۲۳,۴۵۰'; + const losses = '۱,۵۵۰'; + const vetInfo = 'دکتر نرگس مرادی(۰۹۳۵۴۵۶۶۷۷۹)'; + const showReportButton = true; + const reportStatus = 'ارسال تصویر جوجه ریزی فارم'; + final reportColor = AppColor.redDark; + return Container( + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + spacing: 8, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + farmerName, + textAlign: TextAlign.center, + style: AppFonts.yekan16.copyWith(color: AppColor.greenDark), + ), + Spacer(), + Visibility( + visible: showViolationLabel, + child: Text( + violationLabel, + textAlign: TextAlign.center, + style: AppFonts.yekan10.copyWith(color: AppColor.redDark), + ), + ), + ], + ), + Container( + height: 32, + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: ShapeDecoration( + color: AppColor.blueLight, + shape: RoundedRectangleBorder( + side: BorderSide(width: 1, color: AppColor.blueLightHover), + borderRadius: BorderRadius.circular(8), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'نژاد:$breed', + style: AppFonts.yekan14.copyWith(color: AppColor.textColor), + ), + Text( + ' سن $ageInDays (روزه)', + style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), + ), + Text( + ' دوره جوجه ریزی:$growPeriod', + style: AppFonts.yekan14.copyWith(color: AppColor.textColor), + ), + ], + ), + ), + buildRow(title: 'شماره مجوز جوجه ریزی', value: licenceNumber), + buildUnitRow( + title: 'حجم جوجه ریزی', + value: chickVolume, + unit: '(قطعه)', + ), + buildUnitRow( + title: 'مانده در سالن', + value: hallRemain, + unit: '(قطعه)', + ), + buildUnitRow(title: 'تلفات', value: losses, unit: '(قطعه)'), + buildRow(title: 'دامپزشک فارم', value: vetInfo), + buildRow( + title: 'شرح بازرسی', + value: reportStatus, + titleStyle: AppFonts.yekan14.copyWith(color: reportColor), + valueStyle: AppFonts.yekan14.copyWith(color: reportColor), + ), + Visibility( + visible: showReportButton, + child: RElevated( + text: 'ثبت بازرسی', + isFullWidth: true, + width: 150.w, + height: 40.h, + onPressed: () {}, + textStyle: AppFonts.yekan20.copyWith(color: Colors.white), + backgroundColor: AppColor.greenNormal, + ), + ), + ], + ), + ); + } + + Widget activeinspecitonItemListWidget() { + const farmerName = 'آرمان صادقی'; + const farmerMobile = '۰۹۱۲۱۲۳۴۵۶۷'; + const unitName = 'فارم نمونه آفتاب'; + const unitLicence = 'مجوز ۵۴۲۱-الف'; + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox(width: 20), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 5, + children: [ + Text( + farmerName, + textAlign: TextAlign.start, + style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal), + ), + Text( + farmerMobile, + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.bgDark), + ), + ], + ), + ), + Expanded( + flex: 3, + child: Column( + spacing: 5, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + unitName, + textAlign: TextAlign.start, + style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal), + ), + Text( + unitLicence, + textAlign: TextAlign.left, + style: AppFonts.yekan12.copyWith(color: AppColor.bgDark), + ), + ], + ), + ), + Expanded( + flex: 1, + child: Assets.vec.scanSvg.svg( + width: 32.w, + height: 32.h, + colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), + ), + ), + ], + ); + } + + Widget inactiveInspectionWidget() { + return Expanded( + child: ObxValue((data) { + return RPaginatedListView( + listType: ListType.separated, + resource: data.first, + hasMore: false, + onLoadMore: () async {}, + padding: EdgeInsets.fromLTRB(8, 8, 8, 80), + itemBuilder: (context, index) { + return ObxValue((val) { + return ExpandableListItem2( + selected: val.value.isEqual(index), + onTap: () => controller.toggleExpanded(index), + index: index, + child: inActiveinspecitonItemListWidget(), + secondChild: inAvtiveInspectionItemListExpandedWidget(), + labelColor: AppColor.blueLight, + labelIcon: Assets.vec.checkSquareSvg.path, + labelIconColor: AppColor.mediumGreyDarkHover, + ); + }, controller.expandedIndex); + }, + itemCount: 5, + separatorBuilder: (context, index) => SizedBox(height: 8.h), + ); + }, controller.inspectionList), + ); + } + + Widget inActiveinspecitonItemListWidget() { + const farmerName = 'زهرا موسوی'; + const farmerMobile = '۰۹۳۸۸۸۷۷۶۶۵'; + const unitName = 'کشت و پرورش افق سبز'; + const unitLicence = 'مجوز ۷۶۳۲-ج'; + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox(width: 20), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 5, + children: [ + Text( + farmerName, + textAlign: TextAlign.start, + style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal), + ), + Text( + farmerMobile, + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.bgDark), + ), + ], + ), + ), + Expanded( + flex: 3, + child: Column( + spacing: 5, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + unitName, + textAlign: TextAlign.start, + style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal), + ), + Text( + unitLicence, + textAlign: TextAlign.left, + style: AppFonts.yekan12.copyWith(color: AppColor.bgDark), + ), + ], + ), + ), + Expanded( + flex: 1, + child: Assets.vec.scanSvg.svg( + width: 32.w, + height: 32.h, + colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), + ), + ), + ], + ); + } + + Container inAvtiveInspectionItemListExpandedWidget() { + const farmerName = 'زهرا موسوی'; + const showViolationLabel = false; + const violationLabel = 'عادی'; + const breed = 'کاب ۵۰۰'; + const ageInDays = '۳۵'; + const growPeriod = 'پاییز ۱۴۰۳'; + const licenceNumber = '۸۹۴۵۶۱۲۳'; + const chickVolume = '۱۸,۵۰۰'; + const hallRemain = '۱۷,۹۴۰'; + const losses = '۵۶۰'; + const vetInfo = 'دکتر حمید نادری(۰۹۱۳۴۴۵۵۶۶۷)'; + const showReportButton = false; + const reportStatus = 'بازدید تایید شده'; + final reportColor = AppColor.greenNormal; + return Container( + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + spacing: 8, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + farmerName, + textAlign: TextAlign.center, + style: AppFonts.yekan16.copyWith(color: AppColor.greenDark), + ), + Spacer(), + Visibility( + visible: showViolationLabel, + child: Text( + violationLabel, + textAlign: TextAlign.center, + style: AppFonts.yekan10.copyWith(color: AppColor.redDark), + ), + ), + ], + ), + Container( + height: 32, + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: ShapeDecoration( + color: AppColor.blueLight, + shape: RoundedRectangleBorder( + side: BorderSide(width: 1, color: AppColor.blueLightHover), + borderRadius: BorderRadius.circular(8), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'نژاد:$breed', + style: AppFonts.yekan14.copyWith(color: AppColor.textColor), + ), + Text( + ' سن $ageInDays (روزه)', + style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), + ), + Text( + ' دوره جوجه ریزی:$growPeriod', + style: AppFonts.yekan14.copyWith(color: AppColor.textColor), + ), + ], + ), + ), + buildRow(title: 'شماره مجوز جوجه ریزی', value: licenceNumber), + buildUnitRow( + title: 'حجم جوجه ریزی', + value: chickVolume, + unit: '(قطعه)', + ), + buildUnitRow( + title: 'مانده در سالن', + value: hallRemain, + unit: '(قطعه)', + ), + buildUnitRow(title: 'تلفات', value: losses, unit: '(قطعه)'), + buildRow(title: 'دامپزشک فارم', value: vetInfo), + buildRow( + title: 'شرح بازرسی', + value: reportStatus, + titleStyle: AppFonts.yekan14.copyWith(color: reportColor), + valueStyle: AppFonts.yekan14.copyWith(color: reportColor), + ), + ROutlinedElevated( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + spacing: 4, + children: [ + Assets.vec.excelDownloadSvg.svg( + width: 24.w, + height: 24.h, + colorFilter: ColorFilter.mode( + AppColor.greenDark, + BlendMode.srcIn, + ), + ), + + Text( + 'مشاهده جزییات ', + style: AppFonts.yekan14Bold.copyWith( + color: AppColor.greenDark, + ), + ), + ], + ), + borderColor: AppColor.greenDark, + onPressed: () { + Get.bottomSheet( + detailsWidget(), + isScrollControlled: true, + isDismissible: true, + ); + }, + ), + ], + ), + ); + } + + Widget detailsWidget() { + return BaseBottomSheet( + height: Get.height * 0.8, + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + children: [ + Row( + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 4, + vertical: 10, + ), + child: Text( + 'جزییات', + style: AppFonts.yekan18Bold.copyWith( + color: AppColor.iconColor, + ), + ), + ), + ], + ), + Divider( + color: AppColor.blackLightHover, + height: 1, + thickness: 1, + ), + ObxValue((data) { + return tabBarWidget( + ['اطلاعات', 'پاییش سلامت', 'زیرساخت', 'مستندات'], + controller.selectedTabIndex.value, + (index) => controller.changeTab(index), + ); + }, controller.selectedTabIndex), + + ObxValue((data) { + switch (data.value) { + case 0: + return infoTable(); + case 1: + return healthTable(); + case 2: + return infrastructureTable(); + case 3: + return documentsTable(); + default: + return infoTable(); + } + }, controller.selectedTabIndex), + ], + ), + ), + + // Expanded در سطح بالاتر + ], + ), + ); + } + + Container infoTable() { + return Container( + height: Get.height, + width: Get.width, + child: Column( + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'مشخصات کلی', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow(title: 'نام واحد مرغداری', value: 'لذیذ'), + rTableRow(title: 'کد یکتا / شناسه واحد', value: '2541415'), + rTableRow( + title: 'نام مالک / بهره‌بردار', + value: 'مرغداری احمدی', + ), + rTableRow(title: 'موجودی سوخت اضطراری', value: '200 لیتر'), + + rTableRow( + title: 'شهر/تعاونی', + value: 'خرم آباد/تعاونی خرم آباد', + ), + + rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), + rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), + + rTableRow(title: 'سالن', value: '2'), + rTableRow( + title: 'تاریخ ثبت جوجه ریزی', + value: '1402/09/19 (10:12)', + ), + rTableRow( + title: 'شهر/تعاونی', + value: 'خرم آباد/تعاونی خرم آباد', + ), + + rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), + rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), + + rTableRow(title: 'سالن', value: '2'), + rTableRow( + title: 'تاریخ ثبت جوجه ریزی', + value: '1402/09/19 (10:12)', + ), + ], + ), + ), + ], + ), + ); + } + + Row rTableRow({String? title, String? value}) { + return Row( + children: [ + Expanded( + flex: 1, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 9, vertical: 11), + alignment: Alignment.centerRight, + decoration: BoxDecoration( + color: AppColor.bgLight2, + border: Border( + bottom: BorderSide(color: AppColor.blackLightHover, width: 1), + ), + ), + child: Text( + title ?? '', + style: AppFonts.yekan14Bold.copyWith(color: AppColor.iconColor), + ), + ), + ), + Expanded( + flex: 1, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 9, vertical: 11), + alignment: Alignment.centerRight, + decoration: BoxDecoration( + border: Border( + bottom: BorderSide(color: AppColor.blackLightHover, width: 1), + ), + ), + child: Text( + value ?? '', + style: AppFonts.yekan14Bold.copyWith(color: AppColor.textColor), + ), + ), + ), + ], + ); + } + + Widget tabBarWidget( + List tabs, + int selectedIndex, + Function(int) onTabSelected, + ) { + return SizedBox( + height: 38.h, + width: Get.width, + child: Stack( + fit: StackFit.expand, + children: [ + Positioned( + right: 0, + top: 0, + bottom: 0, + child: Row( + children: [ + ...tabs.map( + (tab) => GestureDetector( + onTap: () => onTabSelected(tabs.indexOf(tab)), + behavior: HitTestBehavior.opaque, + child: Container( + padding: EdgeInsets.symmetric( + horizontal: 10, + vertical: 11, + ), + decoration: BoxDecoration( + border: tab == tabs[selectedIndex] + ? Border( + bottom: BorderSide( + color: AppColor.blueNormalOld, + width: 3, + ), + ) + : null, + ), + child: Text( + tab, + style: AppFonts.yekan12Bold.copyWith( + color: tab == tabs[selectedIndex] + ? AppColor.blueNormalOld + : AppColor.mediumGrey, + ), + ), + ), + ), + ), + ], + ), + ), + + Positioned( + bottom: 0, + left: 0, + right: 0, + child: Divider( + color: AppColor.blackLightHover, + height: 1, + thickness: 1, + ), + ), + ], + ), + ); + } + + Widget healthTable() { + return Container( + height: Get.height, + width: Get.width, + child: Column( + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'پاییش سلامت', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow(title: 'نام واحد مرغداری', value: 'لذیذ'), + rTableRow(title: 'کد یکتا / شناسه واحد', value: '2541415'), + rTableRow( + title: 'نام مالک / بهره‌بردار', + value: 'مرغداری احمدی', + ), + rTableRow(title: 'موجودی سوخت اضطراری', value: '200 لیتر'), + + rTableRow( + title: 'شهر/تعاونی', + value: 'خرم آباد/تعاونی خرم آباد', + ), + + rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), + rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), + + rTableRow(title: 'سالن', value: '2'), + rTableRow( + title: 'تاریخ ثبت جوجه ریزی', + value: '1402/09/19 (10:12)', + ), + rTableRow( + title: 'شهر/تعاونی', + value: 'خرم آباد/تعاونی خرم آباد', + ), + + rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), + rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), + + rTableRow(title: 'سالن', value: '2'), + rTableRow( + title: 'تاریخ ثبت جوجه ریزی', + value: '1402/09/19 (10:12)', + ), + ], + ), + ), + ], + ), + ); + } + + Widget infrastructureTable() { + return Container( + height: Get.height, + width: Get.width, + child: Column( + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'زیرساخت', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + SizedBox(height: 10), + + Container( + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: [ + rTableRow(title: 'نام واحد مرغداری', value: 'لذیذ'), + rTableRow(title: 'کد یکتا / شناسه واحد', value: '2541415'), + rTableRow( + title: 'نام مالک / بهره‌بردار', + value: 'مرغداری احمدی', + ), + rTableRow(title: 'موجودی سوخت اضطراری', value: '200 لیتر'), + + rTableRow( + title: 'شهر/تعاونی', + value: 'خرم آباد/تعاونی خرم آباد', + ), + + rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), + rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), + + rTableRow(title: 'سالن', value: '2'), + rTableRow( + title: 'تاریخ ثبت جوجه ریزی', + value: '1402/09/19 (10:12)', + ), + rTableRow( + title: 'شهر/تعاونی', + value: 'خرم آباد/تعاونی خرم آباد', + ), + + rTableRow(title: 'شماره تلفن واحد', value: '021-12345678'), + rTableRow(title: 'دامپزشک فارم', value: 'dd dd (05218569685)'), + + rTableRow(title: 'سالن', value: '2'), + rTableRow( + title: 'تاریخ ثبت جوجه ریزی', + value: '1402/09/19 (10:12)', + ), + ], + ), + ), + ], + ), + ); + } + + Widget documentsTable() { + return Container( + height: Get.height, + width: Get.width, + child: Column( + children: [ + SizedBox(height: 10), + Row( + children: [ + Text( + 'مستندات', + style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor), + ), + ], + ), + + SizedBox(height: 16), + + Container( + height: 135.h, + width: Get.width, + decoration: BoxDecoration( + color: AppColor.bgLight, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + spacing: 10, + children: [ + SizedBox( + height: 100.h, + width: Get.width, + child: ListView.separated( + itemCount: 10, + padding: EdgeInsets.symmetric(horizontal: 12), + scrollDirection: Axis.horizontal, + itemBuilder: (context, index) { + return Container( + width: 80.w, + height: 80.h, + decoration: BoxDecoration( + color: Color(0x33000000), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage( + "https://picsum.photos/150/150?random=$index", + ), + ), + + borderRadius: BorderRadius.circular(8), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(width: 10), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 18), + child: Row( + children: [ + Text( + '200 فارم در این سالن تخمین زده شده است.', + textAlign: TextAlign.right, + style: AppFonts.yekan14Bold.copyWith( + color: AppColor.textColor, + ), + ), + ], + ), + ), + ], + ), + ), + + SizedBox(height: 16), + + Container( + height: 135.h, + width: Get.width, + decoration: BoxDecoration( + color: AppColor.bgLight, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + spacing: 10, + children: [ + SizedBox( + height: 100.h, + width: Get.width, + child: ListView.separated( + itemCount: 10, + padding: EdgeInsets.symmetric(horizontal: 12), + scrollDirection: Axis.horizontal, + itemBuilder: (context, index) { + return Container( + width: 80.w, + height: 80.h, + decoration: BoxDecoration( + color: Color(0x33000000), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage( + "https://picsum.photos/150/150?random=${index * 2 + 1}", + ), + ), + + borderRadius: BorderRadius.circular(8), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(width: 10), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 18), + child: Row( + children: [ + Text( + 'انبار نهاده ها', + textAlign: TextAlign.right, + style: AppFonts.yekan14Bold.copyWith( + color: AppColor.textColor, + ), + ), + ], + ), + ), + ], + ), + ), + + SizedBox(height: 16), + + Container( + height: 135.h, + width: Get.width, + decoration: BoxDecoration( + color: AppColor.bgLight, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + spacing: 10, + children: [ + SizedBox( + height: 100.h, + width: Get.width, + child: ListView.separated( + itemCount: 10, + padding: EdgeInsets.symmetric(horizontal: 12), + scrollDirection: Axis.horizontal, + itemBuilder: (context, index) { + return Container( + width: 80.w, + height: 80.h, + decoration: BoxDecoration( + color: Color(0x33000000), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage( + "https://picsum.photos/150/150?random=${index * 3 + 1}", + ), + ), + + borderRadius: BorderRadius.circular(8), + ), + ); + }, + separatorBuilder: (context, index) => SizedBox(width: 10), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 18), + child: Row( + children: [ + Text( + 'تلفات', + textAlign: TextAlign.right, + style: AppFonts.yekan14Bold.copyWith( + color: AppColor.textColor, + ), + ), + ], + ), + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/packages/chicken/lib/presentation/pages/poultry_farm_inspection/poultry_farm_inspection.dart b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/poultry_farm_inspection.dart new file mode 100644 index 0000000..fa5363a --- /dev/null +++ b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/poultry_farm_inspection.dart @@ -0,0 +1,2 @@ +export 'home/logic.dart'; +export 'home/view.dart'; diff --git a/packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/logic.dart b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/logic.dart new file mode 100644 index 0000000..82090e1 --- /dev/null +++ b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/logic.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:rasadyar_core/presentation/common/app_color.dart'; + +class PoultryFarmInspectionRootLogic extends GetxController { + DateTime? _lastBackPressed; + final pages = [ + Container(color: Colors.amber), + Container(color: Colors.blue), + Container(color: Colors.red), + ]; + + RxInt currentPage = 0.obs; + + @override + void onReady() { + // TODO: implement onReady + super.onReady(); + } + + @override + void onClose() { + // TODO: implement onClose + super.onClose(); + } + + void changePage(int index) { + currentPage.value = index; + } + + void popBackTaped() async { + final now = DateTime.now(); + if (_lastBackPressed == null || now.difference(_lastBackPressed!) > Duration(seconds: 2)) { + _lastBackPressed = now; + Get.snackbar( + 'خروج از برنامه', + 'برای خروج دوباره بازگشت را بزنید', + snackPosition: SnackPosition.TOP, + duration: Duration(seconds: 2), + backgroundColor: AppColor.warning, + ); + } + } +} diff --git a/packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/view.dart b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/view.dart new file mode 100644 index 0000000..5fe1189 --- /dev/null +++ b/packages/chicken/lib/presentation/pages/poultry_farm_inspection/root/view.dart @@ -0,0 +1,58 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; +import 'package:rasadyar_core/core.dart'; + +import 'logic.dart'; + +class PoultryFarmInspectionRootPage extends GetView { + const PoultryFarmInspectionRootPage({super.key}); + + @override + Widget build(BuildContext context) { + return ChickenBasePage( + isFullScreen: true, + onPopScopTaped: controller.popBackTaped, + child: ObxValue((data) { + return Stack( + children: [ + IndexedStack(children: controller.pages, index: data.value), + Positioned( + right: 0, + left: 0, + bottom: 0, + child: RBottomNavigation( + mainAxisAlignment: MainAxisAlignment.spaceAround, + items: [ + RBottomNavigationItem( + label: 'بازرسی فعال', + icon: Assets.vec.settingSvg.path, + isSelected: controller.currentPage.value == 0, + onTap: () { + controller.changePage(0); + }, + ), + RBottomNavigationItem( + label: 'خانه', + icon: Assets.vec.homeSvg.path, + isSelected: controller.currentPage.value == 1, + onTap: () { + controller.changePage(1); + }, + ), + RBottomNavigationItem( + label: 'پروفایل', + icon: Assets.vec.profileCircleSvg.path, + isSelected: controller.currentPage.value == 2, + onTap: () { + controller.changePage(3); + }, + ), + ], + ), + ), + ], + ); + }, controller.currentPage), + ); + } +} diff --git a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart index cb84a89..09235e3 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart @@ -31,5 +31,11 @@ class PoultryActionLogic extends GetxController { route: ChickenRoutes.activeHatchingPoultryScience, icon: Assets.vec.activeFramSvg.path, ), + + PoultryActionItem( + title: "بازرسی مزارع طیور", + route: ChickenRoutes.poultryFarmInspectionHome, + icon: Assets.vec.activeFramSvg.path, + ), ].obs; } diff --git a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart index 597b5f0..066a9c9 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart @@ -31,7 +31,6 @@ class PoultryActionPage extends GetView { title: item.title, vecIcon: item.icon, onTap: () async { - Get.toNamed(item.route, id: poultryFirstKey); }, ); diff --git a/packages/chicken/lib/presentation/routes/pages.dart b/packages/chicken/lib/presentation/routes/pages.dart index 03c1924..22a1194 100644 --- a/packages/chicken/lib/presentation/routes/pages.dart +++ b/packages/chicken/lib/presentation/routes/pages.dart @@ -2,6 +2,7 @@ import 'package:rasadyar_chicken/presentation/pages/common/auth/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/common/auth/view.dart'; import 'package:rasadyar_chicken/presentation/pages/common/role/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/common/role/view.dart'; +import 'package:rasadyar_chicken/presentation/pages/poultry_farm_inspection/poultry_farm_inspection.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/active_hatching/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/active_hatching/view.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/farm/logic.dart'; @@ -69,7 +70,6 @@ sealed class ChickenPages { page: () => HomePage(), middlewares: [AuthMiddleware()], binding: BindingsBuilder(() { - Get.put(HomeLogic()); Get.lazyPut(() => BaseLogic()); }), @@ -223,5 +223,16 @@ sealed class ChickenPages { }), ), //endregion + + //region Poultry Farm Inspection + GetPage( + name: ChickenRoutes.poultryFarmInspectionHome, + page: () => PoultryFarmInspectionHomePage(), + binding: BindingsBuilder(() { + Get.lazyPut(() => PoultryFarmInspectionHomeLogic()); + Get.lazyPut(() => BaseLogic(), fenix: true); + }), + ), + //endregion ]; } diff --git a/packages/chicken/lib/presentation/routes/routes.dart b/packages/chicken/lib/presentation/routes/routes.dart index fe4e827..9049f91 100644 --- a/packages/chicken/lib/presentation/routes/routes.dart +++ b/packages/chicken/lib/presentation/routes/routes.dart @@ -35,7 +35,11 @@ sealed class ChickenRoutes { static const genocidePoultryScience = '$_poultryScience/genocidePoultryScience'; static const killingRegistrationPoultryScience = '$genocidePoultryScience/KillingRegistration'; + //endregion + //region poultry Farm Inspection + static const _poultryFarmInspection = '$_base/poultryFarmInspection'; + static const poultryFarmInspectionHome = '$_poultryFarmInspection/Home'; //endregion } diff --git a/packages/chicken/lib/presentation/widget/info_card/info_card.dart b/packages/chicken/lib/presentation/widget/info_card/info_card.dart new file mode 100644 index 0000000..6345ccd --- /dev/null +++ b/packages/chicken/lib/presentation/widget/info_card/info_card.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_core/core.dart'; + +Widget cardInfo({ + required int value, + required String description, + required Color color, +}) { + return Container( + width: 93.w, + height: 53.h, + decoration: BoxDecoration( + color: color, + borderRadius: BorderRadius.circular(8), + border: Border.all( + width: 0.50, + color: const Color.fromARGB(54, 169, 169, 169), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 4, + children: [ + Text( + value.separatedByCommaFa, + style: AppFonts.yekan13Bold.copyWith(color: AppColor.textColor), + ), + Text( + description, + style: AppFonts.yekan10.copyWith(color: AppColor.textColor), + ), + ], + ), + ); +} diff --git a/packages/core/lib/presentation/common/app_color.dart b/packages/core/lib/presentation/common/app_color.dart index 1a4e92c..53a4c9e 100644 --- a/packages/core/lib/presentation/common/app_color.dart +++ b/packages/core/lib/presentation/common/app_color.dart @@ -4,136 +4,319 @@ class AppColor { AppColor._(); //region --- Blue Colors --- - static const Color blueLight = Color(0xFFeaefff); // #eaefff rgb(234, 239, 255) - static const Color blueLightHover = Color(0xFFe0e7ff); // #e0e7ff rgb(224, 231, 255) - static const Color blueLightActive = Color(0xFFbecdff); // #becdff rgb(190, 205, 255) - static const Color blueNormalOld = Color(0xFF2d5fff); // #2d5fff rgb(45, 95, 255) + static const Color blueLight = Color( + 0xFFeaefff, + ); // #eaefff rgb(234, 239, 255) + static const Color blueLightHover = Color( + 0xFFe0e7ff, + ); // #e0e7ff rgb(224, 231, 255) + static const Color blueLightActive = Color( + 0xFFbecdff, + ); // #becdff rgb(190, 205, 255) + static const Color blueNormalOld = Color( + 0xFF2d5fff, + ); // #2d5fff rgb(45, 95, 255) static const Color blueNormal = blueDark; - static const Color blueNormalHover = Color(0xFF2956e6); // #2956e6 rgb(41, 86, 230) - static const Color blueNormalActive = Color(0xFF244ccc); // #244ccc rgb(36, 76, 204) + static const Color blueNormalHover = Color( + 0xFF2956e6, + ); // #2956e6 rgb(41, 86, 230) + static const Color blueNormalActive = Color( + 0xFF244ccc, + ); // #244ccc rgb(36, 76, 204) static const Color blueDark = Color(0xFF2247bf); // #2247bf rgb(34, 71, 191) - static const Color blueDarkHover = Color(0xFF1b3999); // #1b3999 rgb(27, 57, 153) - static const Color blueDarkActive = Color(0xFF142b73); // #142b73 rgb(20, 43, 115) + static const Color blueDarkHover = Color( + 0xFF1b3999, + ); // #1b3999 rgb(27, 57, 153) + static const Color blueDarkActive = Color( + 0xFF142b73, + ); // #142b73 rgb(20, 43, 115) static const Color blueDarker = Color(0xFF102159); // #102159 rgb(16, 33, 89) - static const Color blueFlashing = Color(0xFF6F91FF); // #6F91FF rgb(111, 145, 255) + static const Color blueFlashing = Color( + 0xFF6F91FF, + ); // #6F91FF rgb(111, 145, 255) //endregion //region --- Green Colors --- - static const Color greenLight = Color(0xFFe6faf5); // #e6faf5 rgb(230, 250, 245) - static const Color greenLightHover = Color(0xFFd9f7f0); // #d9f7f0 rgb(217, 247, 240) - static const Color greenLightActive = Color(0xFFb0efdf); // #b0efdf rgb(176, 239, 223) - static const Color greenNormal = Color(0xFF00cc99); // #00cc99 rgb(0, 204, 153) - static const Color greenNormalHover = Color(0xFF00b88a); // #00b88a rgb(0, 184, 138) - static const Color greenNormalActive = Color(0xFF00a37a); // #00a37a rgb(0, 163, 122) + static const Color greenLight = Color( + 0xFFe6faf5, + ); // #e6faf5 rgb(230, 250, 245) + static const Color greenLightHover = Color( + 0xFFd9f7f0, + ); // #d9f7f0 rgb(217, 247, 240) + static const Color greenLightActive = Color( + 0xFFb0efdf, + ); // #b0efdf rgb(176, 239, 223) + static const Color greenNormal = Color( + 0xFF00cc99, + ); // #00cc99 rgb(0, 204, 153) + static const Color greenNormalHover = Color( + 0xFF00b88a, + ); // #00b88a rgb(0, 184, 138) + static const Color greenNormalActive = Color( + 0xFF00a37a, + ); // #00a37a rgb(0, 163, 122) static const Color greenDark = Color(0xFF009973); // #009973 rgb(0, 153, 115) - static const Color greenDarkHover = Color(0xFF007a5c); // #007a5c rgb(0, 122, 92) - static const Color greenDarkActive = Color(0xFF005c45); // #005c45 rgb(0, 92, 69) + static const Color greenDarkHover = Color( + 0xFF007a5c, + ); // #007a5c rgb(0, 122, 92) + static const Color greenDarkActive = Color( + 0xFF005c45, + ); // #005c45 rgb(0, 92, 69) static const Color greenDarker = Color(0xFF004736); // #004736 rgb(0, 71, 54) //endregion //region --- Black Colors --- - static const Color blackLight = Color(0xFFe6e6e6); // #e6e6e6 rgb(230, 230, 230) - static const Color blackLightHover = Color(0xFFd9d9d9); // #d9d9d9 rgb(217, 217, 217) - static const Color blackLightActive = Color(0xFFb0b0b0); // #b0b0b0 rgb(176, 176, 176) + static const Color blackLight = Color( + 0xFFe6e6e6, + ); // #e6e6e6 rgb(230, 230, 230) + static const Color blackLightHover = Color( + 0xFFd9d9d9, + ); // #d9d9d9 rgb(217, 217, 217) + static const Color blackLightActive = Color( + 0xFFb0b0b0, + ); // #b0b0b0 rgb(176, 176, 176) static const Color blackNormal = Color(0xFF000000); // #000000 rgb(0, 0, 0) - static const Color blackNormalHover = Color(0xFF000000); // #000000 rgb(0, 0, 0) - static const Color blackNormalActive = Color(0xFF000000); // #000000 rgb(0, 0, 0) + static const Color blackNormalHover = Color( + 0xFF000000, + ); // #000000 rgb(0, 0, 0) + static const Color blackNormalActive = Color( + 0xFF000000, + ); // #000000 rgb(0, 0, 0) static const Color blackDark = Color(0xFF000000); // #000000 rgb(0, 0, 0) static const Color blackDarkHover = Color(0xFF000000); // #000000 rgb(0, 0, 0) - static const Color blackDarkActive = Color(0xFF000000); // #000000 rgb(0, 0, 0) + static const Color blackDarkActive = Color( + 0xFF000000, + ); // #000000 rgb(0, 0, 0) static const Color blackDarker = Color(0xFF000000); // #000000 rgb(0, 0, 0) //endregion //region --- Grey Colors --- - static const Color darkGreyLight = Color(0xFFeaeaea); // #eaeaea rgb(234, 234, 234) - static const Color darkGreyLightHover = Color(0xFFdfdfdf); // #dfdfdf rgb(223, 223, 223) - static const Color darkGreyLightActive = Color(0xFFbdbdbd); // #bdbdbd rgb(189, 189, 189) - static const Color darkGreyNormal = Color(0xFF2a2a2a); // #2a2a2a rgb(42, 42, 42) - static const Color darkGreyNormalHover = Color(0xFF262626); // #262626 rgb(38, 38, 38) - static const Color darkGreyNormalActive = Color(0xFF222222); // #222222 rgb(34, 34, 34) - static const Color darkGreyDark = Color(0xFF202020); // #202020 rgb(32, 32, 32) - static const Color darkGreyDarkHover = Color(0xFF191919); // #191919 rgb(25, 25, 25) - static const Color darkGreyDarkActive = Color(0xFF131313); // #131313 rgb(19, 19, 19) - static const Color darkGreyDarker = Color(0xFF0f0f0f); // #0f0f0f rgb(15, 15, 15) + static const Color darkGreyLight = Color( + 0xFFeaeaea, + ); // #eaeaea rgb(234, 234, 234) + static const Color darkGreyLightHover = Color( + 0xFFdfdfdf, + ); // #dfdfdf rgb(223, 223, 223) + static const Color darkGreyLightActive = Color( + 0xFFbdbdbd, + ); // #bdbdbd rgb(189, 189, 189) + static const Color darkGreyNormal = Color( + 0xFF2a2a2a, + ); // #2a2a2a rgb(42, 42, 42) + static const Color darkGreyNormalHover = Color( + 0xFF262626, + ); // #262626 rgb(38, 38, 38) + static const Color darkGreyNormalActive = Color( + 0xFF222222, + ); // #222222 rgb(34, 34, 34) + static const Color darkGreyDark = Color( + 0xFF202020, + ); // #202020 rgb(32, 32, 32) + static const Color darkGreyDarkHover = Color( + 0xFF191919, + ); // #191919 rgb(25, 25, 25) + static const Color darkGreyDarkActive = Color( + 0xFF131313, + ); // #131313 rgb(19, 19, 19) + static const Color darkGreyDarker = Color( + 0xFF0f0f0f, + ); // #0f0f0f rgb(15, 15, 15) //endregion //region ---Medium Grey Colors --- - static const Color mediumGreyLight = Color(0xFFf4f4f4); // #f4f4f4 rgb(244, 244, 244) - static const Color mediumGreyLightHover = Color(0xFFeeeeee); // #eeeeee rgb(238, 238, 238) - static const Color mediumGreyLightActive = Color(0xFFdcdcdc); // #dcdcdc rgb(220, 220, 220) - static const Color mediumGreyNormal = Color(0xFF8f8f8f); // #8f8f8f rgb(143, 143, 143) - static const Color mediumGreyNormalHover = Color(0xFF818181); // #818181 rgb(129, 129, 129) - static const Color mediumGreyNormalActive = Color(0xFF727272); // #727272 rgb(114, 114, 114) - static const Color mediumGreyDark = Color(0xFF6b6b6b); // #6b6b6b rgb(107, 107, 107) - static const Color mediumGreyDarkHover = Color(0xFF565656); // #565656 rgb(86, 86, 86) - static const Color mediumGreyDarkActive = Color(0xFF404040); // #404040 rgb(64, 64, 64) - static const Color mediumGreyDarker = Color(0xFF323232); // #323232 rgb(50, 50, 50) - static const Color customGrey = Color(0xFF808081); // #808081 rgb(128, 128, 129) + static const Color mediumGrey = Color( + 0xFF979797, + ); // #979797 rgb(151, 151, 151) + static const Color mediumGreyLight = Color( + 0xFFf4f4f4, + ); // #f4f4f4 rgb(244, 244, 244) + static const Color mediumGreyLightHover = Color( + 0xFFeeeeee, + ); // #eeeeee rgb(238, 238, 238) + static const Color mediumGreyLightActive = Color( + 0xFFdcdcdc, + ); // #dcdcdc rgb(220, 220, 220) + static const Color mediumGreyNormal = Color( + 0xFF8f8f8f, + ); // #8f8f8f rgb(143, 143, 143) + static const Color mediumGreyNormalHover = Color( + 0xFF818181, + ); // #818181 rgb(129, 129, 129) + static const Color mediumGreyNormalActive = Color( + 0xFF727272, + ); // #727272 rgb(114, 114, 114) + static const Color mediumGreyDark = Color( + 0xFF6b6b6b, + ); // #6b6b6b rgb(107, 107, 107) + static const Color mediumGreyDarkHover = Color( + 0xFF565656, + ); // #565656 rgb(86, 86, 86) + static const Color mediumGreyDarkActive = Color( + 0xFF404040, + ); // #404040 rgb(64, 64, 64) + static const Color mediumGreyDarker = Color( + 0xFF323232, + ); // #323232 rgb(50, 50, 50) + static const Color customGrey = Color( + 0xFF808081, + ); // #808081 rgb(128, 128, 129) //endregion //region ---Light Grey Colors --- - static const Color lightGreyLight = Color(0xFFfdfdfd); // #fdfdfd rgb(253, 253, 253) - static const Color lightGreyLightHover = Color(0xFFfcfcfc); // #fcfcfc rgb(252, 252, 252) - static const Color lightGreyLightActive = Color(0xFFfafafa); // #fafafa rgb(250, 250, 250) - static const Color lightGreyNormal = Color(0xFFeeeeee); // #eeeeee rgb(238, 238, 238) - static const Color lightGreyNormalHover = Color(0xFFd6d6d6); // #d6d6d6 rgb(214, 214, 214) - static const Color lightGreyNormalActive = Color(0xFFbebebe); // #bebebe rgb(190, 190, 190) - static const Color lightGreyDark = Color(0xFFb3b3b3); // #b3b3b3 rgb(179, 179, 179) - static const Color lightGreyDarkHover = Color(0xFF8f8f8f); // #8f8f8f rgb(143, 143, 143) - static const Color lightGreyDarkActive = Color(0xFF6b6b6b); // #6b6b6b rgb(107, 107, 107) - static const Color lightGreyDarker = Color(0xFF535353); // #535353 rgb(83, 83, 83) + static const Color lightGreyLight = Color( + 0xFFfdfdfd, + ); // #fdfdfd rgb(253, 253, 253) + static const Color lightGreyLightHover = Color( + 0xFFfcfcfc, + ); // #fcfcfc rgb(252, 252, 252) + static const Color lightGreyLightActive = Color( + 0xFFfafafa, + ); // #fafafa rgb(250, 250, 250) + static const Color lightGreyNormal = Color( + 0xFFeeeeee, + ); // #eeeeee rgb(238, 238, 238) + static const Color lightGreyNormalHover = Color( + 0xFFd6d6d6, + ); // #d6d6d6 rgb(214, 214, 214) + static const Color lightGreyNormalActive = Color( + 0xFFbebebe, + ); // #bebebe rgb(190, 190, 190) + static const Color lightGreyDark = Color( + 0xFFb3b3b3, + ); // #b3b3b3 rgb(179, 179, 179) + static const Color lightGreyDarkHover = Color( + 0xFF8f8f8f, + ); // #8f8f8f rgb(143, 143, 143) + static const Color lightGreyDarkActive = Color( + 0xFF6b6b6b, + ); // #6b6b6b rgb(107, 107, 107) + static const Color lightGreyDarker = Color( + 0xFF535353, + ); // #535353 rgb(83, 83, 83) //endregion //region ---WhiteGrey Colors --- - static const Color whiteGreyLight = Color(0xFFfefefe); // #fefefe rgb(254, 254, 254) - static const Color whiteGreyLightHover = Color(0xFFfefefe); // #fefefe rgb(254, 254, 254) - static const Color whiteGreyLightActive = Color(0xFFfdfdfd); // #fdfdfd rgb(253, 253, 253) - static const Color whiteGreyNormal = Color(0xFFf9f9f9); // #f9f9f9 rgb(249, 249, 249) - static const Color whiteGreyNormalHover = Color(0xFFe0e0e0); // #e0e0e0 rgb(224, 224, 224) - static const Color whiteGreyNormalActive = Color(0xFFc7c7c7); // #c7c7c7 rgb(199, 199, 199) - static const Color whiteGreyDark = Color(0xFFbbbbbb); // #bbbbbb rgb(187, 187, 187) - static const Color whiteGreyDarkHover = Color(0xFF959595); // #959595 rgb(149, 149, 149) - static const Color whiteGreyDarkActive = Color(0xFF707070); // #707070 rgb(112, 112, 112) - static const Color whiteGreyDarker = Color(0xFF575757); // #575757 rgb(87, 87, 87) + static const Color whiteGreyLight = Color( + 0xFFfefefe, + ); // #fefefe rgb(254, 254, 254) + static const Color whiteGreyLightHover = Color( + 0xFFfefefe, + ); // #fefefe rgb(254, 254, 254) + static const Color whiteGreyLightActive = Color( + 0xFFfdfdfd, + ); // #fdfdfd rgb(253, 253, 253) + static const Color whiteGreyNormal = Color( + 0xFFf9f9f9, + ); // #f9f9f9 rgb(249, 249, 249) + static const Color whiteGreyNormalHover = Color( + 0xFFe0e0e0, + ); // #e0e0e0 rgb(224, 224, 224) + static const Color whiteGreyNormalActive = Color( + 0xFFc7c7c7, + ); // #c7c7c7 rgb(199, 199, 199) + static const Color whiteGreyDark = Color( + 0xFFbbbbbb, + ); // #bbbbbb rgb(187, 187, 187) + static const Color whiteGreyDarkHover = Color( + 0xFF959595, + ); // #959595 rgb(149, 149, 149) + static const Color whiteGreyDarkActive = Color( + 0xFF707070, + ); // #707070 rgb(112, 112, 112) + static const Color whiteGreyDarker = Color( + 0xFF575757, + ); // #575757 rgb(87, 87, 87) //endregion //region ---White Colors --- - static const Color whiteLight = Color(0xFFffffff); // #ffffff rgb(255, 255, 255) - static const Color whiteLightHover = Color(0xFFffffff); // #ffffff rgb(255, 255, 255) - static const Color whiteLightActive = Color(0xFFffffff); // #ffffff rgb(255, 255, 255) - static const Color whiteNormal = Color(0xFFffffff); // #ffffff rgb(255, 255, 255) - static const Color whiteNormalHover = Color(0xFFe6e6e6); // #e6e6e6 rgb(230, 230, 230) - static const Color whiteNormalActive = Color(0xFFcccccc); // #cccccc rgb(204, 204, 204) - static const Color whiteDark = Color(0xFFbfbfbf); // #bfbfbf rgb(191, 191, 191) - static const Color whiteDarkHover = Color(0xFF999999); // #999999 rgb(153, 153, 153) - static const Color whiteDarkActive = Color(0xFF737373); // #737373 rgb(115, 115, 115) + static const Color whiteLight = Color( + 0xFFffffff, + ); // #ffffff rgb(255, 255, 255) + static const Color whiteLightHover = Color( + 0xFFffffff, + ); // #ffffff rgb(255, 255, 255) + static const Color whiteLightActive = Color( + 0xFFffffff, + ); // #ffffff rgb(255, 255, 255) + static const Color whiteNormal = Color( + 0xFFffffff, + ); // #ffffff rgb(255, 255, 255) + static const Color whiteNormalHover = Color( + 0xFFe6e6e6, + ); // #e6e6e6 rgb(230, 230, 230) + static const Color whiteNormalActive = Color( + 0xFFcccccc, + ); // #cccccc rgb(204, 204, 204) + static const Color whiteDark = Color( + 0xFFbfbfbf, + ); // #bfbfbf rgb(191, 191, 191) + static const Color whiteDarkHover = Color( + 0xFF999999, + ); // #999999 rgb(153, 153, 153) + static const Color whiteDarkActive = Color( + 0xFF737373, + ); // #737373 rgb(115, 115, 115) static const Color whiteDarker = Color(0xFF595959); // #595959 rgb(89, 89, 89) //endregion //region --- green1 Colors --- - static const Color green1Light = Color(0xFFe6f6f4); // #e6f6f4 rgb(230, 246, 244) - static const Color green1LightHover = Color(0xFFd9f2ef); // #d9f2ef rgb(217, 242, 239) - static const Color green1LightActive = Color(0xFFb0e4dd); // #b0e4dd rgb(176, 228, 221) - static const Color green1Normal = Color(0xFF00a991); // #00a991 rgb(0, 169, 145) - static const Color green1NormalHover = Color(0xFF009883); // #009883 rgb(0, 152, 131) - static const Color green1NormalActive = Color(0xFF008774); // #008774 rgb(0, 135, 116) + static const Color green1Light = Color( + 0xFFe6f6f4, + ); // #e6f6f4 rgb(230, 246, 244) + static const Color green1LightHover = Color( + 0xFFd9f2ef, + ); // #d9f2ef rgb(217, 242, 239) + static const Color green1LightActive = Color( + 0xFFb0e4dd, + ); // #b0e4dd rgb(176, 228, 221) + static const Color green1Normal = Color( + 0xFF00a991, + ); // #00a991 rgb(0, 169, 145) + static const Color green1NormalHover = Color( + 0xFF009883, + ); // #009883 rgb(0, 152, 131) + static const Color green1NormalActive = Color( + 0xFF008774, + ); // #008774 rgb(0, 135, 116) static const Color green1Dark = Color(0xFF007f6d); // #007f6d rgb(0, 127, 109) - static const Color green1DarkHover = Color(0xFF006557); // #006557 rgb(0, 101, 87) - static const Color green1DarkActive = Color(0xFF004c41); // #004c41 rgb(0, 76, 65) + static const Color green1DarkHover = Color( + 0xFF006557, + ); // #006557 rgb(0, 101, 87) + static const Color green1DarkActive = Color( + 0xFF004c41, + ); // #004c41 rgb(0, 76, 65) static const Color green1Darker = Color(0xFF003b33); // #003b33 rgb(0, 59, 51) //endregion //region --- Yellow Colors --- - static const Color yellowLight = Color(0xFFfff9e6); // #fff9e6 rgb(255, 249, 230) - static const Color yellowLightHover = Color(0xFFfff6da); // #fff6da rgb(255, 246, 218) - static const Color yellowLightActive = Color(0xFFffecb2); // #ffecb2 rgb(255, 236, 178) - static const Color yellowNormal = Color(0xFFffc107); // #ffc107 rgb(255, 193, 7) - static const Color yellowNormal2 = Color(0xFFFF9800); // #FF9800 rgb(255, 152, 0) - static const Color yellowNormalHover = Color(0xFFe6ae06); // #e6ae06 rgb(230, 174, 6) - static const Color yellowNormalActive = Color(0xFFcc9a06); // #cc9a06 rgb(204, 154, 6) + static const Color yellowLight = Color( + 0xFFfff9e6, + ); // #fff9e6 rgb(255, 249, 230) + static const Color yellowLightHover = Color( + 0xFFfff6da, + ); // #fff6da rgb(255, 246, 218) + static const Color yellowLightActive = Color( + 0xFFffecb2, + ); // #ffecb2 rgb(255, 236, 178) + static const Color yellowNormal = Color( + 0xFFffc107, + ); // #ffc107 rgb(255, 193, 7) + static const Color yellowNormal2 = Color( + 0xFFFF9800, + ); // #FF9800 rgb(255, 152, 0) + static const Color yellowNormalHover = Color( + 0xFFe6ae06, + ); // #e6ae06 rgb(230, 174, 6) + static const Color yellowNormalActive = Color( + 0xFFcc9a06, + ); // #cc9a06 rgb(204, 154, 6) static const Color yellowDark = Color(0xFFbf9105); // #bf9105 rgb(191, 145, 5) - static const Color yellowDarkHover = Color(0xFF997404); // #997404 rgb(153, 116, 4) - static const Color yellowDarkActive = Color(0xFF735703); // #735703 rgb(115, 87, 3) + static const Color yellowDarkHover = Color( + 0xFF997404, + ); // #997404 rgb(153, 116, 4) + static const Color yellowDarkActive = Color( + 0xFF735703, + ); // #735703 rgb(115, 87, 3) static const Color yellowDarker = Color(0xFF594402); // #594402 rgb(89, 68, 2) // #594402 rgb(89, 68, 2) @@ -141,31 +324,65 @@ class AppColor { //region --- red Colors --- static const Color redLight = Color(0xFFfdeeee); // #fdeeee rgb(253, 238, 238) - static const Color redLightHover = Color(0xFFfce6e6); // #fce6e6 rgb(252, 230, 230) - static const Color redLightActive = Color(0xFFf9cbcb); // #f9cbcb rgb(249, 203, 203) + static const Color redLightHover = Color( + 0xFFfce6e6, + ); // #fce6e6 rgb(252, 230, 230) + static const Color redLightActive = Color( + 0xFFf9cbcb, + ); // #f9cbcb rgb(249, 203, 203) static const Color redNormal = Color(0xFFeb5757); // #eb5757 rgb(235, 87, 87) - static const Color redNormalHover = Color(0xFFd44e4e); // #d44e4e rgb(212, 78, 78) - static const Color redNormalActive = Color(0xFFbc4646); // #bc4646 rgb(188, 70, 70) + static const Color redNormalHover = Color( + 0xFFd44e4e, + ); // #d44e4e rgb(212, 78, 78) + static const Color redNormalActive = Color( + 0xFFbc4646, + ); // #bc4646 rgb(188, 70, 70) static const Color redDark = Color(0xFFb04141); // #b04141 rgb(176, 65, 65) - static const Color redDarkHover = Color(0xFF8d3434); // #8d3434 rgb(141, 52, 52) - static const Color redDarkActive = Color(0xFF6a2727); // #6a2727 rgb(106, 39, 39) + static const Color redDarkHover = Color( + 0xFF8d3434, + ); // #8d3434 rgb(141, 52, 52) + static const Color redDarkActive = Color( + 0xFF6a2727, + ); // #6a2727 rgb(106, 39, 39) static const Color redDarker = Color(0xFF521e1e); // #521e1e rgb(82, 30, 30) - static const Color redDarkerText = Color(0xFFD24E4E); // #D34E4E rgba(211, 78, 78, 1) + static const Color redDarkerText = Color( + 0xFFD24E4E, + ); // #D34E4E rgba(211, 78, 78, 1) - static const Color redLight2 = Color(0xFFEDDCE0); // #EDDCE0 rgb(237, 220, 224) - static const Color redLightActive2 = Color(0xFFE0BCC5); // #E0BCC5 rgb(224, 188, 197) + static const Color redLight2 = Color( + 0xFFEDDCE0, + ); // #EDDCE0 rgb(237, 220, 224) + static const Color redLightActive2 = Color( + 0xFFE0BCC5, + ); // #E0BCC5 rgb(224, 188, 197) //endregion //region --- Teal Colors --- - static const Color tealLight = Color(0xFFe8f6f8); // #e8f6f8 rgb(232, 246, 248) - static const Color tealLightHover = Color(0xFFdcf1f4); // #dcf1f4 rgb(220, 241, 244) - static const Color tealLightActive = Color(0xFFb7e2e9); // #b7e2e9 rgb(183, 226, 233) - static const Color tealNormal = Color(0xFF17a2b8); // #17a2b8 rgb(23, 162, 184) - static const Color tealNormalHover = Color(0xFF1592a6); // #1592a6 rgb(21, 146, 166) - static const Color tealNormalActive = Color(0xFF128293); // #128293 rgb(18, 130, 147) + static const Color tealLight = Color( + 0xFFe8f6f8, + ); // #e8f6f8 rgb(232, 246, 248) + static const Color tealLightHover = Color( + 0xFFdcf1f4, + ); // #dcf1f4 rgb(220, 241, 244) + static const Color tealLightActive = Color( + 0xFFb7e2e9, + ); // #b7e2e9 rgb(183, 226, 233) + static const Color tealNormal = Color( + 0xFF17a2b8, + ); // #17a2b8 rgb(23, 162, 184) + static const Color tealNormalHover = Color( + 0xFF1592a6, + ); // #1592a6 rgb(21, 146, 166) + static const Color tealNormalActive = Color( + 0xFF128293, + ); // #128293 rgb(18, 130, 147) static const Color tealDark = Color(0xFF117a8a); // #117a8a rgb(17, 122, 138) - static const Color tealDarkHover = Color(0xFF0e616e); // #0e616e rgb(14, 97, 110) - static const Color tealDarkActive = Color(0xFF0a4953); // #0a4953 rgb(10, 73, 83) + static const Color tealDarkHover = Color( + 0xFF0e616e, + ); // #0e616e rgb(14, 97, 110) + static const Color tealDarkActive = Color( + 0xFF0a4953, + ); // #0a4953 rgb(10, 73, 83) static const Color tealDarker = Color(0xFF083940); // #083940 rgb(8, 57, 64) static const Color bgLight = Color(0xFFF5F5F5); // #083940 rgb(8, 57, 64) @@ -175,10 +392,12 @@ class AppColor { static const Color labelTextColor = Color(0xFF808080); static const Color textColorLight = Color(0xFFB2B2B2); static const Color iconColor = Color(0xFF444444); // #444444 rgb(68, 68, 68) - static const Color borderColor = Color(0xFFC7CFCD); // #C7CFCD rgb(199, 207, 205)` + static const Color borderColor = Color( + 0xFFC7CFCD, + ); // #C7CFCD rgb(199, 207, 205)` static const Color unselectTextColor = Color(0xFF888888); // static const Color accent1 = Color(0xffffe5ce); // - + static const Color bgLight2 = Color(0xFFEFEFEF); // #EFEFEF rgb(239, 239, 239) //endregion //region --- category Colors ---