From c2f574014a11e4ac51c8abc3f1a8382d5ca02fac Mon Sep 17 00:00:00 2001 From: Dennis Nemec Date: Fri, 9 Jan 2026 12:43:16 +0100 Subject: [PATCH] Enhanced discount input. It was possible to remove a discount that has not been saved yet. --- lib/feature/delivery/detail/presentation/delivery_discount.dart | 2 +- pubspec.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"