feat: warehouse_and_distribution in killhouse module

This commit is contained in:
2025-12-01 15:25:19 +03:30
parent 6861e873ba
commit c42ee069e6
57 changed files with 11246 additions and 208 deletions

View File

@@ -49,6 +49,7 @@ class DioRemote implements IHttpClient {
@override
Future<DioResponse<T>> get<T>(
String path, {
CancelToken? cancelToken,
Map<String, dynamic>? queryParameters,
Map<String, String>? headers,
ProgressCallback? onReceiveProgress,
@@ -61,7 +62,7 @@ class DioRemote implements IHttpClient {
queryParameters: queryParameters,
options: Options(headers: headers),
onReceiveProgress: onReceiveProgress,
cancelToken: ApiHandler.globalCancelToken,
cancelToken: cancelToken ?? ApiHandler.globalCancelToken,
);
if (fromJsonListAsync != null && response.data is List) {
response.data = await fromJsonListAsync(response.data);

View File

@@ -21,7 +21,10 @@ class CardIcon extends StatelessWidget {
this.iconWidth = 48,
this.iconHeight = 48,
this.iconColor,
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
}) : assert(
(svgIcon != null) || (vecIcon != null),
'Either svgIcon or vecIcon must be provided',
);
final String title;
final int spacing;
@@ -83,7 +86,12 @@ class CardIcon extends StatelessWidget {
Text(
title,
textAlign: TextAlign.center,
style: titleStyle ?? AppFonts.yekan16Bold.copyWith(color: titleColor, height: 1.20),
style:
titleStyle ??
AppFonts.yekan16Bold.copyWith(
color: titleColor,
height: 1.20,
),
),
],
),
@@ -114,7 +122,10 @@ class GlassMorphismCardIcon extends StatelessWidget {
this.iconHeight = 48,
this.iconColor,
this.gradient,
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
}) : assert(
(svgIcon != null) || (vecIcon != null),
'Either svgIcon or vecIcon must be provided',
);
final String title;
final int spacing;
@@ -174,7 +185,10 @@ class GlassMorphismCardIcon extends StatelessWidget {
textAlign: TextAlign.center,
style:
titleStyle ??
AppFonts.yekan18Bold.copyWith(color: titleColor, height: 1.20),
AppFonts.yekan18Bold.copyWith(
color: titleColor,
height: 1.20,
),
),
),
],
@@ -208,13 +222,19 @@ class GlassMorphismCardIcon extends StatelessWidget {
fit: BoxFit.cover,
width: iconWidth.w,
height: iconHeight.h,
colorFilter: ColorFilter.mode(iconColor ?? Colors.white, BlendMode.srcIn),
colorFilter: ColorFilter.mode(
iconColor ?? Colors.white,
BlendMode.srcIn,
),
)
: SvgGenImage.vec(vecIcon!).svg(
fit: BoxFit.fill,
width: iconWidth.w,
height: iconHeight.h,
colorFilter: ColorFilter.mode(iconColor ?? Colors.white, BlendMode.srcIn),
colorFilter: ColorFilter.mode(
iconColor ?? Colors.white,
BlendMode.srcIn,
),
),
),
),
@@ -230,12 +250,22 @@ class GlassMorphismCardItem {
final String title;
final String route;
final String icon;
final int? navId;
GlassMorphismCardItem({required this.title, required this.route, required this.icon});
GlassMorphismCardItem({
required this.title,
required this.route,
required this.icon,
this.navId,
});
}
class GlassMorphismGrid extends StatelessWidget {
const GlassMorphismGrid({super.key, required this.items, required this.onTap});
const GlassMorphismGrid({
super.key,
required this.items,
required this.onTap,
});
final List<GlassMorphismCardItem> items;
final void Function(GlassMorphismCardItem item) onTap;