const constructure
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user