update total price

This commit is contained in:
efrilm
2025-10-25 03:03:44 +07:00
parent 013f313e35
commit 0e83d213fc
9 changed files with 401 additions and 60 deletions
@@ -6,9 +6,9 @@ class ProductQuantity with _$ProductQuantity {
required Product product,
ProductVariant? variant,
required int quantity,
String? notes,
required String notes,
}) = _ProductQuantity;
factory ProductQuantity.empty() =>
ProductQuantity(product: Product.empty(), quantity: 0);
ProductQuantity(product: Product.empty(), quantity: 0, notes: '');
}
+13 -13
View File
@@ -1097,7 +1097,7 @@ mixin _$ProductQuantity {
Product get product => throw _privateConstructorUsedError;
ProductVariant? get variant => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError;
String? get notes => throw _privateConstructorUsedError;
String get notes => throw _privateConstructorUsedError;
/// Create a copy of ProductQuantity
/// with the given fields replaced by the non-null parameter values.
@@ -1117,7 +1117,7 @@ abstract class $ProductQuantityCopyWith<$Res> {
Product product,
ProductVariant? variant,
int quantity,
String? notes,
String notes,
});
$ProductCopyWith<$Res> get product;
@@ -1142,7 +1142,7 @@ class _$ProductQuantityCopyWithImpl<$Res, $Val extends ProductQuantity>
Object? product = null,
Object? variant = freezed,
Object? quantity = null,
Object? notes = freezed,
Object? notes = null,
}) {
return _then(
_value.copyWith(
@@ -1158,10 +1158,10 @@ class _$ProductQuantityCopyWithImpl<$Res, $Val extends ProductQuantity>
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
notes: freezed == notes
notes: null == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
as String,
)
as $Val,
);
@@ -1205,7 +1205,7 @@ abstract class _$$ProductQuantityImplCopyWith<$Res>
Product product,
ProductVariant? variant,
int quantity,
String? notes,
String notes,
});
@override
@@ -1231,7 +1231,7 @@ class __$$ProductQuantityImplCopyWithImpl<$Res>
Object? product = null,
Object? variant = freezed,
Object? quantity = null,
Object? notes = freezed,
Object? notes = null,
}) {
return _then(
_$ProductQuantityImpl(
@@ -1247,10 +1247,10 @@ class __$$ProductQuantityImplCopyWithImpl<$Res>
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
notes: freezed == notes
notes: null == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
as String,
),
);
}
@@ -1265,7 +1265,7 @@ class _$ProductQuantityImpl
required this.product,
this.variant,
required this.quantity,
this.notes,
required this.notes,
});
@override
@@ -1275,7 +1275,7 @@ class _$ProductQuantityImpl
@override
final int quantity;
@override
final String? notes;
final String notes;
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
@@ -1326,7 +1326,7 @@ abstract class _ProductQuantity implements ProductQuantity {
required final Product product,
final ProductVariant? variant,
required final int quantity,
final String? notes,
required final String notes,
}) = _$ProductQuantityImpl;
@override
@@ -1336,7 +1336,7 @@ abstract class _ProductQuantity implements ProductQuantity {
@override
int get quantity;
@override
String? get notes;
String get notes;
/// Create a copy of ProductQuantity
/// with the given fields replaced by the non-null parameter values.