diff --git a/packages/smooth_app/lib/pages/personalized_ranking_page.dart b/packages/smooth_app/lib/pages/personalized_ranking_page.dart index 83af14529f7..0d35c0f5aa0 100644 --- a/packages/smooth_app/lib/pages/personalized_ranking_page.dart +++ b/packages/smooth_app/lib/pages/personalized_ranking_page.dart @@ -9,6 +9,7 @@ import 'package:smooth_app/data_models/smooth_it_model.dart'; import 'package:smooth_app/data_models/user_preferences.dart'; import 'package:smooth_app/database/dao_product_list.dart'; import 'package:smooth_app/database/local_database.dart'; +import 'package:smooth_app/generic_lib/design_constants.dart'; import 'package:smooth_app/helpers/analytics_helper.dart'; import 'package:smooth_app/helpers/smooth_matched_product.dart'; @@ -154,6 +155,17 @@ class _PersonalizedRankingPageState extends State { 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); diff --git a/packages/smooth_app/lib/pages/scan/search_history_view.dart b/packages/smooth_app/lib/pages/scan/search_history_view.dart index 9227cb127c3..0b8e4b1a979 100644 --- a/packages/smooth_app/lib/pages/scan/search_history_view.dart +++ b/packages/smooth_app/lib/pages/scan/search_history_view.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:smooth_app/database/dao_string_list.dart'; import 'package:smooth_app/database/local_database.dart'; +import 'package:smooth_app/generic_lib/design_constants.dart'; class SearchHistoryView extends StatefulWidget { const SearchHistoryView({ @@ -47,7 +48,7 @@ class _SearchHistoryViewState extends State { direction: DismissDirection.endToStart, onDismissed: (DismissDirection direction) => _handleDismissed(context, query), - background: Container(color: Colors.red), + background: Container(color: RED_COLOR), child: ListTile( leading: const SizedBox( height: double.infinity, // Vertically center the icon.