Skip to content

Commit

Permalink
dismissible color added to personalized ranking
Browse files Browse the repository at this point in the history
  • Loading branch information
AshAman999 committed Apr 3, 2022
1 parent 1712a5e commit fde1a98
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/smooth_app/lib/pages/personalized_ranking_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import 'package:smooth_app/database/local_database.dart';
import 'package:smooth_app/helpers/analytics_helper.dart';
import 'package:smooth_app/helpers/smooth_matched_product.dart';

import '../generic_lib/design_constants.dart';

class PersonalizedRankingPage extends StatefulWidget {
PersonalizedRankingPage({
required final ProductList productList,
Expand Down Expand Up @@ -154,6 +156,17 @@ class _PersonalizedRankingPageState extends State<PersonalizedRankingPage> {
final AppLocalizations appLocalizations,
) =>
Dismissible(
direction: DismissDirection.endToStart,
background: Container(
alignment: Alignment.centerRight,
margin: const EdgeInsets.symmetric(vertical: 14),
color: RED_COLOR,
padding: const EdgeInsets.only(right: 30),
child: const Icon(
Icons.delete,
color: Colors.white,
),
),
key: Key(matchedProduct.product.barcode!),
onDismissed: (final DismissDirection direction) async {
final bool removed = widget.products.remove(matchedProduct.product);
Expand Down

0 comments on commit fde1a98

Please sign in to comment.