Skip to content

Commit

Permalink
feat: 5905 - toggle instead of check box for "discount" price (#5930)
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurtanuki authored Nov 26, 2024
1 parent 6c6eae0 commit d4507d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/smooth_app/lib/pages/prices/price_amount_card.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -65,12 +64,13 @@ class _PriceAmountCardState extends State<PriceAmountCard> {
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(
Expand Down

0 comments on commit d4507d0

Please sign in to comment.