diff --git a/packages/smooth_app/lib/pages/onboarding/preferences_page.dart b/packages/smooth_app/lib/pages/onboarding/preferences_page.dart index 881edc9de3b..aaa79e5b23f 100644 --- a/packages/smooth_app/lib/pages/onboarding/preferences_page.dart +++ b/packages/smooth_app/lib/pages/onboarding/preferences_page.dart @@ -7,14 +7,12 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:openfoodfacts/openfoodfacts.dart'; import 'package:provider/provider.dart'; import 'package:smooth_app/data_models/onboarding_data_product.dart'; -import 'package:smooth_app/data_models/preferences/user_preferences.dart'; import 'package:smooth_app/data_models/product_preferences.dart'; import 'package:smooth_app/database/local_database.dart'; import 'package:smooth_app/generic_lib/design_constants.dart'; import 'package:smooth_app/helpers/app_helper.dart'; import 'package:smooth_app/pages/onboarding/next_button.dart'; import 'package:smooth_app/pages/onboarding/onboarding_flow_navigator.dart'; -import 'package:smooth_app/pages/preferences/user_preferences_food.dart'; import 'package:smooth_app/pages/product/summary_card.dart'; class PreferencesPage extends StatefulWidget { @@ -77,7 +75,6 @@ class _HelperState extends State<_Helper> { Widget build(BuildContext context) { final ProductPreferences productPreferences = context.watch(); - final UserPreferences userPreferences = context.watch(); final AppLocalizations appLocalizations = AppLocalizations.of(context); final List pageData = [ SvgPicture.asset( @@ -112,16 +109,6 @@ class _HelperState extends State<_Helper> { ), ), ]; - pageData.addAll( - UserPreferencesFood( - productPreferences: productPreferences, - setState: setState, - context: context, - userPreferences: userPreferences, - appLocalizations: appLocalizations, - themeData: Theme.of(context), - ).getOnboardingContent(), - ); return ColoredBox( color: widget.backgroundColor, child: SafeArea( diff --git a/packages/smooth_app/lib/pages/product/summary_card.dart b/packages/smooth_app/lib/pages/product/summary_card.dart index 7df9eb02455..6991bcbb853 100644 --- a/packages/smooth_app/lib/pages/product/summary_card.dart +++ b/packages/smooth_app/lib/pages/product/summary_card.dart @@ -92,7 +92,8 @@ class _SummaryCardState extends State with UpToDateMixin { super.initState(); initUpToDate(widget._product, context.read()); _questionsLayout = getUserQuestionsLayout(context.read()); - if (ProductIncompleteCard.isProductIncomplete(initialProduct)) { + if (widget.isProductEditable && + ProductIncompleteCard.isProductIncomplete(initialProduct)) { AnalyticsHelper.trackEvent( AnalyticsEvent.showFastTrackProductEditCard, barcode: barcode, @@ -356,7 +357,8 @@ class _SummaryCardState extends State with UpToDateMixin { }); }, ), - if (ProductIncompleteCard.isProductIncomplete(upToDateProduct)) + if (widget.isProductEditable && + ProductIncompleteCard.isProductIncomplete(upToDateProduct)) ProductIncompleteCard(product: upToDateProduct), ..._getAttributes(scoreAttributes), if (widget.isFullVersion &&