feat: killHouse action page
This commit is contained in:
@@ -92,7 +92,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
|
||||
case "ProvinceFinancial":
|
||||
return {"مالی اتحادیه": null};
|
||||
case "KillHouse":
|
||||
return {"کشتارگاه": null};
|
||||
return {"کشتارگاه": ChickenRoutes.initKillHouse};
|
||||
case "KillHouseVet":
|
||||
return {"دامپزشک کشتارگاه": null};
|
||||
case "VetFarm":
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_request_response.freezed.dart';
|
||||
part 'kill_request_response.g.dart';
|
||||
|
||||
@freezed
|
||||
class KillRequestResponse with _$KillRequestResponse {
|
||||
const factory KillRequestResponse({
|
||||
int? killCapacity,
|
||||
String? reciveTime,
|
||||
String? reciveDate,
|
||||
bool? lowWeight,
|
||||
bool? highWeight,
|
||||
double? indexWeight,
|
||||
String? chickenBreed,
|
||||
bool? cash,
|
||||
bool? credit,
|
||||
bool? smsPayment,
|
||||
String? killHouseKey,
|
||||
String? killerKillHouseKey,
|
||||
String? role,
|
||||
}) = _KillRequestResponse;
|
||||
|
||||
factory KillRequestResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillRequestResponseFromJson(json);
|
||||
}
|
||||
@@ -15,7 +15,8 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$KillRegistrationRequest {
|
||||
|
||||
bool? get approvedPrice; bool? get market; String? get killReqKey; String? get operatorKey; String? get poultryHatchingKey; int? get quantity; String? get sendDate; String? get chickenBreed;@JsonKey(name: "Index_weight") double? get indexWeight; String? get losses; List<dynamic>? get auctionList; bool? get freezing; bool? get export; bool? get cash; bool? get credit; List<dynamic>? get killHouseList; String? get role; String? get poultryKey; int? get amount; String? get financialOperation; bool? get freeSaleInProvince; String? get confirmPoultryMobile;
|
||||
bool? get approvedPrice; bool? get market; String? get killReqKey; String? get operatorKey; String? get poultryHatchingKey; int? get quantity; String? get sendDate; String? get chickenBreed;// ignore: invalid_annotation_target
|
||||
@JsonKey(name: "Index_weight") double? get indexWeight; String? get losses; List<dynamic>? get auctionList; bool? get freezing; bool? get export; bool? get cash; bool? get credit; List<dynamic>? get killHouseList; String? get role; String? get poultryKey; int? get amount; String? get financialOperation; bool? get freeSaleInProvince; String? get confirmPoultryMobile;
|
||||
/// Create a copy of KillRegistrationRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -241,6 +242,7 @@ class _KillRegistrationRequest implements KillRegistrationRequest {
|
||||
@override final int? quantity;
|
||||
@override final String? sendDate;
|
||||
@override final String? chickenBreed;
|
||||
// ignore: invalid_annotation_target
|
||||
@override@JsonKey(name: "Index_weight") final double? indexWeight;
|
||||
@override final String? losses;
|
||||
final List<dynamic>? _auctionList;
|
||||
|
||||
@@ -15,7 +15,8 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$PoultryOrder {
|
||||
|
||||
String? get key; int? get id; Poultry? get poultry; int? get orderCode; String? get createDate; String? get sendDate; List<String>? get killHouseList; int? get firstQuantity; int? get quantity; bool? get directBuying; bool? get union; double? get amount; String? get financialOperation; int? get remainQuantity;@JsonKey(name: "Index_weight") double? get indexWeight; Hatching? get hatching; String? get finalState; int? get losses; String? get provinceState; String? get stateProcess; Registrar? get registrar; VetFarm? get vetFarm; bool? get freeSaleInProvince; bool? get freezing; bool? get export; String? get cityCheckRequest; bool? get market;
|
||||
String? get key; int? get id; Poultry? get poultry; int? get orderCode; String? get createDate; String? get sendDate; List<String>? get killHouseList; int? get firstQuantity; int? get quantity; bool? get directBuying; bool? get union; double? get amount; String? get financialOperation; int? get remainQuantity;// ignore: invalid_annotation_target
|
||||
@JsonKey(name: "Index_weight") double? get indexWeight; Hatching? get hatching; String? get finalState; int? get losses; String? get provinceState; String? get stateProcess; Registrar? get registrar; VetFarm? get vetFarm; bool? get freeSaleInProvince; bool? get freezing; bool? get export; String? get cityCheckRequest; bool? get market;
|
||||
/// Create a copy of PoultryOrder
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -308,6 +309,7 @@ class _PoultryOrder implements PoultryOrder {
|
||||
@override final double? amount;
|
||||
@override final String? financialOperation;
|
||||
@override final int? remainQuantity;
|
||||
// ignore: invalid_annotation_target
|
||||
@override@JsonKey(name: "Index_weight") final double? indexWeight;
|
||||
@override final Hatching? hatching;
|
||||
@override final String? finalState;
|
||||
|
||||
@@ -119,17 +119,11 @@ class AuthLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
await tokenStorageService.saveModule(_module);
|
||||
await tokenStorageService.saveAccessToken(_module, result?.accessToken ?? '');
|
||||
await tokenStorageService.saveRefreshToken(_module, result?.accessToken ?? '');
|
||||
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();*/
|
||||
var tmpRoles = result?.role?.where((element) {
|
||||
final allowedRoles = {'poultryscience', 'steward', 'killhouse'};
|
||||
final lowerElement = element.toString().toLowerCase().trim();
|
||||
return allowedRoles.contains(lowerElement);
|
||||
}).toList();
|
||||
|
||||
await tokenStorageService.saveRoles(_module, tmpRoles ?? []);
|
||||
if (rememberMe.value) {
|
||||
|
||||
@@ -32,11 +32,17 @@ class RolePage extends GetView<RoleLogic> {
|
||||
return roleCard(
|
||||
title: role.keys.first,
|
||||
onTap: () async {
|
||||
String route = role.values.first;
|
||||
await controller.gService.saveRoute(Module.chicken, route);
|
||||
try {
|
||||
String route = role.values.first;
|
||||
await controller.gService.saveRoute(Module.chicken, route);
|
||||
|
||||
await controller.gService.saveRole(Module.chicken, data[index]);
|
||||
Get.offAllNamed(route);
|
||||
await controller.gService.saveRole(Module.chicken, data[index]);
|
||||
Get.offAllNamed(route);
|
||||
} catch (e) {
|
||||
eLog(
|
||||
"احتمالا در\n ``getFaUserRoleWithOnTap`` \nروت اش را تعریف نکردی 👻👻 ==>$e ",
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class KillHouseActionLogic extends GetxController {
|
||||
List<GlassMorphismCardItem> items = [
|
||||
GlassMorphismCardItem(title: "ثبت درخواست", icon: Assets.vec.submitRequestSvg.path, route: ''),
|
||||
GlassMorphismCardItem(
|
||||
title: "انبار و توزیع",
|
||||
icon: Assets.vec.warehouseDistributionSvg.path,
|
||||
route: '',
|
||||
),
|
||||
GlassMorphismCardItem(
|
||||
title: "سفارشات دریافتی",
|
||||
icon: Assets.vec.ordersReceivedSvg.path,
|
||||
route: '',
|
||||
),
|
||||
GlassMorphismCardItem(title: "خرید مستقیم", icon: Assets.vec.directPurchaseSvg.path, route: ''),
|
||||
GlassMorphismCardItem(title: "تخصیص خودرو", icon: Assets.vec.carAllocationSvg.path, route: ''),
|
||||
GlassMorphismCardItem(
|
||||
title: "ورود اطلاعات بار",
|
||||
icon: Assets.vec.enterCargoInformationSvg.path,
|
||||
route: '',
|
||||
),
|
||||
GlassMorphismCardItem(
|
||||
title: "مدیریت بارها",
|
||||
icon: Assets.vec.managementBarsSvg.path,
|
||||
route: '',
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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 KillHouseActionPage extends GetView<KillHouseActionLogic> {
|
||||
const KillHouseActionPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChickenBasePage(
|
||||
isBase: true,
|
||||
child: GlassMorphismGrid(
|
||||
items: controller.items,
|
||||
onTap: () {
|
||||
iLog("Hoooooura 😍😍😍😍😍");
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class KillHouseRootLogic extends GetxController {
|
||||
RxInt currentPage = 2.obs;
|
||||
|
||||
final pages = [
|
||||
Navigator(
|
||||
key: Get.nestedKey(killHouseFirstKey),
|
||||
onGenerateRoute: (settings) {
|
||||
final page = ChickenPages.pages.firstWhere(
|
||||
(e) => e.name == settings.name,
|
||||
orElse: () =>
|
||||
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.actionKillHouse),
|
||||
);
|
||||
|
||||
return buildRouteFromGetPage(page);
|
||||
},
|
||||
),
|
||||
Container(color: Colors.deepPurpleAccent.withAlpha(50)),
|
||||
ProfilePage(),
|
||||
];
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
void changePage(int i) {
|
||||
currentPage.value = i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
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 KillHouseRootPage extends GetView<KillHouseRootLogic> {
|
||||
const KillHouseRootPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ObxValue((data) {
|
||||
return ChickenBasePage(
|
||||
isBase: true,
|
||||
isFullScreen: true,
|
||||
scrollable: true,
|
||||
child: 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: () {
|
||||
/* Get.nestedKey(
|
||||
poultrySecondKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);*/
|
||||
controller.changePage(0);
|
||||
},
|
||||
),
|
||||
RBottomNavigationItem(
|
||||
label: 'خانه',
|
||||
icon: Assets.vec.homeSvg.path,
|
||||
isSelected: controller.currentPage.value == 1,
|
||||
onTap: () {
|
||||
/* Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultryThirdKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);*/
|
||||
controller.changePage(1);
|
||||
},
|
||||
),
|
||||
RBottomNavigationItem(
|
||||
label: 'پروفایل',
|
||||
icon: Assets.vec.profileCircleSvg.path,
|
||||
isSelected: controller.currentPage.value == 2,
|
||||
onTap: () {
|
||||
/* Get.nestedKey(
|
||||
poultryFirstKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);
|
||||
Get.nestedKey(
|
||||
poultrySecondKey,
|
||||
)?.currentState?.popUntil((route) => route.isFirst);*/
|
||||
controller.changePage(2);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}, controller.currentPage);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,10 @@ 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/kill_house/action/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/action/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/root/logic.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/kill_house/root/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';
|
||||
@@ -234,5 +238,27 @@ sealed class ChickenPages {
|
||||
}),
|
||||
),
|
||||
//endregion
|
||||
|
||||
//region kill house
|
||||
GetPage(
|
||||
name: ChickenRoutes.initKillHouse,
|
||||
page: () => KillHouseRootPage(),
|
||||
binding: BindingsBuilder(() {
|
||||
Get.lazyPut(() => KillHouseRootLogic());
|
||||
Get.lazyPut(() => BaseLogic(), fenix: true);
|
||||
}),
|
||||
),
|
||||
GetPage(
|
||||
name: ChickenRoutes.actionKillHouse,
|
||||
page: () => KillHouseActionPage(),
|
||||
bindings: [
|
||||
GlobalBinding(),
|
||||
BindingsBuilder(() {
|
||||
Get.lazyPut(() => KillHouseActionLogic());
|
||||
Get.lazyPut(() => BaseLogic(), fenix: true);
|
||||
}),
|
||||
],
|
||||
),
|
||||
//endregion
|
||||
];
|
||||
}
|
||||
|
||||
@@ -42,4 +42,12 @@ sealed class ChickenRoutes {
|
||||
static const poultryFarmInspectionHome = '$_poultryFarmInspection/Home';
|
||||
|
||||
//endregion
|
||||
|
||||
//region KillHouse Routes
|
||||
|
||||
static const _killHouse = '$_base/killHouse';
|
||||
static const initKillHouse = '$_killHouse/home';
|
||||
static const actionKillHouse = '$_killHouse/action';
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -11,3 +11,8 @@ const int poultryFirstKey = 105;
|
||||
const int poultrySecondKey = 106;
|
||||
const int poultryThirdKey = 107;
|
||||
//endregion
|
||||
|
||||
//region kill house Keys
|
||||
const int killHouseFirstKey = 108;
|
||||
|
||||
//endregion
|
||||
|
||||
@@ -79,6 +79,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/call.svg
|
||||
SvgGenImage get call => const SvgGenImage('assets/icons/call.svg');
|
||||
|
||||
/// File path: assets/icons/car_allocation.svg
|
||||
SvgGenImage get carAllocation => const SvgGenImage('assets/icons/car_allocation.svg');
|
||||
|
||||
/// File path: assets/icons/check.svg
|
||||
SvgGenImage get check => const SvgGenImage('assets/icons/check.svg');
|
||||
|
||||
@@ -163,6 +166,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/diagram.svg
|
||||
SvgGenImage get diagram => const SvgGenImage('assets/icons/diagram.svg');
|
||||
|
||||
/// File path: assets/icons/direct_purchase.svg
|
||||
SvgGenImage get directPurchase => const SvgGenImage('assets/icons/direct_purchase.svg');
|
||||
|
||||
/// File path: assets/icons/download.svg
|
||||
SvgGenImage get download => const SvgGenImage('assets/icons/download.svg');
|
||||
|
||||
@@ -172,6 +178,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/empty.svg
|
||||
SvgGenImage get empty => const SvgGenImage('assets/icons/empty.svg');
|
||||
|
||||
/// File path: assets/icons/enter_cargo_information.svg
|
||||
SvgGenImage get enterCargoInformation => const SvgGenImage('assets/icons/enter_cargo_information.svg');
|
||||
|
||||
/// File path: assets/icons/excel_download.svg
|
||||
SvgGenImage get excelDownload => const SvgGenImage('assets/icons/excel_download.svg');
|
||||
|
||||
@@ -232,6 +241,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/logout.svg
|
||||
SvgGenImage get logout => const SvgGenImage('assets/icons/logout.svg');
|
||||
|
||||
/// File path: assets/icons/management_bars.svg
|
||||
SvgGenImage get managementBars => const SvgGenImage('assets/icons/management_bars.svg');
|
||||
|
||||
/// File path: assets/icons/map.svg
|
||||
SvgGenImage get map => const SvgGenImage('assets/icons/map.svg');
|
||||
|
||||
@@ -250,6 +262,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/note_remove.svg
|
||||
SvgGenImage get noteRemove => const SvgGenImage('assets/icons/note_remove.svg');
|
||||
|
||||
/// File path: assets/icons/orders_received.svg
|
||||
SvgGenImage get ordersReceived => const SvgGenImage('assets/icons/orders_received.svg');
|
||||
|
||||
/// File path: assets/icons/outside.svg
|
||||
SvgGenImage get outside => const SvgGenImage('assets/icons/outside.svg');
|
||||
|
||||
@@ -328,6 +343,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/shopping_basket.svg
|
||||
SvgGenImage get shoppingBasket => const SvgGenImage('assets/icons/shopping_basket.svg');
|
||||
|
||||
/// File path: assets/icons/submit_request.svg
|
||||
SvgGenImage get submitRequest => const SvgGenImage('assets/icons/submit_request.svg');
|
||||
|
||||
/// File path: assets/icons/tag_label.svg
|
||||
SvgGenImage get tagLabel => const SvgGenImage('assets/icons/tag_label.svg');
|
||||
|
||||
@@ -364,6 +382,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/virtual.svg
|
||||
SvgGenImage get virtual => const SvgGenImage('assets/icons/virtual.svg');
|
||||
|
||||
/// File path: assets/icons/warehouse_distribution.svg
|
||||
SvgGenImage get warehouseDistribution => const SvgGenImage('assets/icons/warehouse_distribution.svg');
|
||||
|
||||
/// File path: assets/icons/whare_house.svg
|
||||
SvgGenImage get whareHouse => const SvgGenImage('assets/icons/whare_house.svg');
|
||||
|
||||
@@ -385,6 +406,7 @@ class $AssetsIconsGen {
|
||||
calendarSearchOutline,
|
||||
calendarTick,
|
||||
call,
|
||||
carAllocation,
|
||||
check,
|
||||
checkSquare,
|
||||
chicken,
|
||||
@@ -413,9 +435,11 @@ class $AssetsIconsGen {
|
||||
cubeTopRotation,
|
||||
cubeWatting,
|
||||
diagram,
|
||||
directPurchase,
|
||||
download,
|
||||
edit,
|
||||
empty,
|
||||
enterCargoInformation,
|
||||
excelDownload,
|
||||
farm,
|
||||
farms,
|
||||
@@ -436,12 +460,14 @@ class $AssetsIconsGen {
|
||||
liveStock,
|
||||
lock,
|
||||
logout,
|
||||
managementBars,
|
||||
map,
|
||||
map1,
|
||||
map2,
|
||||
mapMarker,
|
||||
messageAdd,
|
||||
noteRemove,
|
||||
ordersReceived,
|
||||
outside,
|
||||
pdfDownload,
|
||||
people,
|
||||
@@ -468,6 +494,7 @@ class $AssetsIconsGen {
|
||||
setting,
|
||||
shop,
|
||||
shoppingBasket,
|
||||
submitRequest,
|
||||
tagLabel,
|
||||
tagUser,
|
||||
task,
|
||||
@@ -480,6 +507,7 @@ class $AssetsIconsGen {
|
||||
userRaduis,
|
||||
userSquare,
|
||||
virtual,
|
||||
warehouseDistribution,
|
||||
whareHouse,
|
||||
];
|
||||
}
|
||||
@@ -570,6 +598,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/call.svg.vec
|
||||
SvgGenImage get callSvg => const SvgGenImage.vec('assets/vec/call.svg.vec');
|
||||
|
||||
/// File path: assets/vec/car_allocation.svg.vec
|
||||
SvgGenImage get carAllocationSvg => const SvgGenImage.vec('assets/vec/car_allocation.svg.vec');
|
||||
|
||||
/// File path: assets/vec/check.svg.vec
|
||||
SvgGenImage get checkSvg => const SvgGenImage.vec('assets/vec/check.svg.vec');
|
||||
|
||||
@@ -654,6 +685,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/diagram.svg.vec
|
||||
SvgGenImage get diagramSvg => const SvgGenImage.vec('assets/vec/diagram.svg.vec');
|
||||
|
||||
/// File path: assets/vec/direct_purchase.svg.vec
|
||||
SvgGenImage get directPurchaseSvg => const SvgGenImage.vec('assets/vec/direct_purchase.svg.vec');
|
||||
|
||||
/// File path: assets/vec/download.svg.vec
|
||||
SvgGenImage get downloadSvg => const SvgGenImage.vec('assets/vec/download.svg.vec');
|
||||
|
||||
@@ -663,6 +697,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/empty.svg.vec
|
||||
SvgGenImage get emptySvg => const SvgGenImage.vec('assets/vec/empty.svg.vec');
|
||||
|
||||
/// File path: assets/vec/enter_cargo_information.svg.vec
|
||||
SvgGenImage get enterCargoInformationSvg => const SvgGenImage.vec('assets/vec/enter_cargo_information.svg.vec');
|
||||
|
||||
/// File path: assets/vec/excel_download.svg.vec
|
||||
SvgGenImage get excelDownloadSvg => const SvgGenImage.vec('assets/vec/excel_download.svg.vec');
|
||||
|
||||
@@ -723,6 +760,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/logout.svg.vec
|
||||
SvgGenImage get logoutSvg => const SvgGenImage.vec('assets/vec/logout.svg.vec');
|
||||
|
||||
/// File path: assets/vec/management_bars.svg.vec
|
||||
SvgGenImage get managementBarsSvg => const SvgGenImage.vec('assets/vec/management_bars.svg.vec');
|
||||
|
||||
/// File path: assets/vec/map.svg.vec
|
||||
SvgGenImage get mapSvg => const SvgGenImage.vec('assets/vec/map.svg.vec');
|
||||
|
||||
@@ -741,6 +781,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/note_remove.svg.vec
|
||||
SvgGenImage get noteRemoveSvg => const SvgGenImage.vec('assets/vec/note_remove.svg.vec');
|
||||
|
||||
/// File path: assets/vec/orders_received.svg.vec
|
||||
SvgGenImage get ordersReceivedSvg => const SvgGenImage.vec('assets/vec/orders_received.svg.vec');
|
||||
|
||||
/// File path: assets/vec/outside.svg.vec
|
||||
SvgGenImage get outsideSvg => const SvgGenImage.vec('assets/vec/outside.svg.vec');
|
||||
|
||||
@@ -819,6 +862,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/shopping_basket.svg.vec
|
||||
SvgGenImage get shoppingBasketSvg => const SvgGenImage.vec('assets/vec/shopping_basket.svg.vec');
|
||||
|
||||
/// File path: assets/vec/submit_request.svg.vec
|
||||
SvgGenImage get submitRequestSvg => const SvgGenImage.vec('assets/vec/submit_request.svg.vec');
|
||||
|
||||
/// File path: assets/vec/tag_label.svg.vec
|
||||
SvgGenImage get tagLabelSvg => const SvgGenImage.vec('assets/vec/tag_label.svg.vec');
|
||||
|
||||
@@ -855,6 +901,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/virtual.svg.vec
|
||||
SvgGenImage get virtualSvg => const SvgGenImage.vec('assets/vec/virtual.svg.vec');
|
||||
|
||||
/// File path: assets/vec/warehouse_distribution.svg.vec
|
||||
SvgGenImage get warehouseDistributionSvg => const SvgGenImage.vec('assets/vec/warehouse_distribution.svg.vec');
|
||||
|
||||
/// File path: assets/vec/whare_house.svg.vec
|
||||
SvgGenImage get whareHouseSvg => const SvgGenImage.vec('assets/vec/whare_house.svg.vec');
|
||||
|
||||
@@ -876,6 +925,7 @@ class $AssetsVecGen {
|
||||
calendarSearchOutlineSvg,
|
||||
calendarTickSvg,
|
||||
callSvg,
|
||||
carAllocationSvg,
|
||||
checkSvg,
|
||||
checkSquareSvg,
|
||||
chickenSvg,
|
||||
@@ -904,9 +954,11 @@ class $AssetsVecGen {
|
||||
cubeTopRotationSvg,
|
||||
cubeWattingSvg,
|
||||
diagramSvg,
|
||||
directPurchaseSvg,
|
||||
downloadSvg,
|
||||
editSvg,
|
||||
emptySvg,
|
||||
enterCargoInformationSvg,
|
||||
excelDownloadSvg,
|
||||
farmSvg,
|
||||
farmsSvg,
|
||||
@@ -927,12 +979,14 @@ class $AssetsVecGen {
|
||||
liveStockSvg,
|
||||
lockSvg,
|
||||
logoutSvg,
|
||||
managementBarsSvg,
|
||||
mapSvg,
|
||||
map1Svg,
|
||||
map2Svg,
|
||||
mapMarkerSvg,
|
||||
messageAddSvg,
|
||||
noteRemoveSvg,
|
||||
ordersReceivedSvg,
|
||||
outsideSvg,
|
||||
pdfDownloadSvg,
|
||||
peopleSvg,
|
||||
@@ -959,6 +1013,7 @@ class $AssetsVecGen {
|
||||
settingSvg,
|
||||
shopSvg,
|
||||
shoppingBasketSvg,
|
||||
submitRequestSvg,
|
||||
tagLabelSvg,
|
||||
tagUserSvg,
|
||||
taskSvg,
|
||||
@@ -971,6 +1026,7 @@ class $AssetsVecGen {
|
||||
userRaduisSvg,
|
||||
userSquareSvg,
|
||||
virtualSvg,
|
||||
warehouseDistributionSvg,
|
||||
whareHouseSvg,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -225,3 +225,37 @@ class GlassMorphismCardIcon extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class GlassMorphismCardItem {
|
||||
final String title;
|
||||
final String route;
|
||||
final String icon;
|
||||
|
||||
GlassMorphismCardItem({required this.title, required this.route, required this.icon});
|
||||
}
|
||||
|
||||
class GlassMorphismGrid extends StatelessWidget {
|
||||
const GlassMorphismGrid({super.key, required this.items, required this.onTap});
|
||||
|
||||
final List<GlassMorphismCardItem> items;
|
||||
final VoidCallback onTap;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GridView.builder(
|
||||
physics: BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.symmetric(vertical: 18.h, horizontal: 32.w),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 24.h,
|
||||
crossAxisSpacing: 24.w,
|
||||
),
|
||||
itemCount: items.length,
|
||||
hitTestBehavior: HitTestBehavior.opaque,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var item = items[index];
|
||||
return GlassMorphismCardIcon(title: item.title, vecIcon: item.icon, onTap: onTap);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user