From d4507d03cb71d6a7d74a1dfa0dc99198c9e6f8e7 Mon Sep 17 00:00:00 2001 From: monsieurtanuki Date: Tue, 26 Nov 2024 19:10:16 +0100 Subject: [PATCH] feat: 5905 - toggle instead of check box for "discount" price (#5930) --- .../smooth_app/lib/pages/prices/price_amount_card.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/smooth_app/lib/pages/prices/price_amount_card.dart b/packages/smooth_app/lib/pages/prices/price_amount_card.dart index 65553aa5244..0a3b67465c7 100644 --- a/packages/smooth_app/lib/pages/prices/price_amount_card.dart +++ b/packages/smooth_app/lib/pages/prices/price_amount_card.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:provider/provider.dart'; -import 'package:smooth_app/generic_lib/buttons/smooth_large_button_with_icon.dart'; import 'package:smooth_app/generic_lib/design_constants.dart'; import 'package:smooth_app/generic_lib/widgets/smooth_card.dart'; import 'package:smooth_app/pages/prices/price_amount_field.dart'; @@ -65,12 +64,13 @@ class _PriceAmountCardState extends State { onPressed: total == 1 ? null : () => priceModel.removeAt(widget.index), ), - SmoothLargeButtonWithIcon( - icon: model.promo ? Icons.check_box : Icons.check_box_outline_blank, - text: appLocalizations.prices_amount_is_discounted, - onPressed: () => setState( + SwitchListTile( + value: model.promo, + onChanged: (final bool value) => setState( () => model.promo = !model.promo, ), + title: Text(appLocalizations.prices_amount_is_discounted), + controlAffinity: ListTileControlAffinity.leading, ), const SizedBox(height: SMALL_SPACE), Row(