diff --git a/lib/feature/delivery/detail/presentation/delivery_discount.dart b/lib/feature/delivery/detail/presentation/delivery_discount.dart index 00a22dd..e96b998 100644 --- a/lib/feature/delivery/detail/presentation/delivery_discount.dart +++ b/lib/feature/delivery/detail/presentation/delivery_discount.dart @@ -208,7 +208,7 @@ class _DeliveryDiscountState extends State { ), ), OutlinedButton( - onPressed: _discountValue > 0 ? _resetValues : null, + onPressed: _discountValue > 0 && widget.discount != null ? _resetValues : null, child: const Text("Gutschrift entfernen"), ), ], diff --git a/pubspec.lock b/pubspec.lock index 4d898d2..1f1f501 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -194,7 +194,7 @@ packages: source: hosted version: "4.10.1" collection: - dependency: transitive + dependency: "direct main" description: name: collection sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"