const constructure

This commit is contained in:
Efril
2026-03-01 20:02:12 +07:00
parent 5058f99fe0
commit e625bd3d2a
142 changed files with 817 additions and 760 deletions
@@ -89,6 +89,7 @@ class ProductAnalyticCategoryItem with _$ProductAnalyticCategoryItem {
required int totalRevenue,
}) = _ProductAnalyticCategoryItem;
// ignore: prefer_const_constructors
factory ProductAnalyticCategoryItem.empty() => ProductAnalyticCategoryItem(
categoryName: '',
productCount: 0,
@@ -10,8 +10,8 @@ class ListCustomer with _$ListCustomer {
required int totalPages,
}) = _ListCustomer;
factory ListCustomer.empty() => ListCustomer(
customers: const [],
factory ListCustomer.empty() => const ListCustomer(
customers: [],
totalCount: 0,
page: 0,
limit: 0,
@@ -10,7 +10,7 @@ class AddItemOrderRequest with _$AddItemOrderRequest {
required String notes,
}) = _AddItemOrderRequest;
factory AddItemOrderRequest.empty() => AddItemOrderRequest(
factory AddItemOrderRequest.empty() => const AddItemOrderRequest(
productId: '',
productVariantId: '',
quantity: 0,
+7 -2
View File
@@ -10,8 +10,13 @@ class ListOrder with _$ListOrder {
required int totalPages,
}) = _ListOrder;
factory ListOrder.empty() =>
ListOrder(orders: [], totalCount: 0, page: 0, limit: 0, totalPages: 0);
factory ListOrder.empty() => const ListOrder(
orders: [],
totalCount: 0,
page: 0,
limit: 0,
totalPages: 0,
);
}
@freezed
@@ -10,7 +10,7 @@ class ListPaymentMethod with _$ListPaymentMethod {
required int totalPages,
}) = _ListPaymentMethod;
factory ListPaymentMethod.empty() => ListPaymentMethod(
factory ListPaymentMethod.empty() => const ListPaymentMethod(
paymentMethods: [],
totalCount: 0,
page: 0,
+7 -2
View File
@@ -10,8 +10,13 @@ class ListTable with _$ListTable {
required int totalPages,
}) = _ListTable;
factory ListTable.empty() =>
ListTable(tables: [], totalCount: 0, page: 0, limit: 0, totalPages: 0);
factory ListTable.empty() => const ListTable(
tables: [],
totalCount: 0,
page: 0,
limit: 0,
totalPages: 0,
);
}
@freezed