From 8b101ac02bb6676cb0d6545c1b22795c9a2067d0 Mon Sep 17 00:00:00 2001 From: Edouard Marquez Date: Sun, 24 Nov 2024 12:59:22 +0100 Subject: [PATCH] Knowledge Panel background color in light mode + product name --- .../knowledge_panels/knowledge_panel_page.dart | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_page.dart b/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_page.dart index 93eb004619a..ddbe6ded227 100644 --- a/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_page.dart +++ b/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_page.dart @@ -8,10 +8,14 @@ import 'package:smooth_app/data_models/up_to_date_mixin.dart'; import 'package:smooth_app/database/local_database.dart'; import 'package:smooth_app/generic_lib/design_constants.dart'; import 'package:smooth_app/generic_lib/widgets/smooth_card.dart'; +import 'package:smooth_app/helpers/product_cards_helper.dart'; import 'package:smooth_app/knowledge_panel/knowledge_panels/knowledge_panel_expanded_card.dart'; import 'package:smooth_app/knowledge_panel/knowledge_panels_builder.dart'; import 'package:smooth_app/pages/product/common/product_refresher.dart'; import 'package:smooth_app/pages/scan/carousel/scan_carousel_manager.dart'; +import 'package:smooth_app/themes/smooth_theme.dart'; +import 'package:smooth_app/themes/smooth_theme_colors.dart'; +import 'package:smooth_app/themes/theme_provider.dart'; import 'package:smooth_app/widgets/smooth_app_bar.dart'; import 'package:smooth_app/widgets/smooth_scaffold.dart'; @@ -57,14 +61,23 @@ class _KnowledgePanelPageState extends State context.watch(); refreshUpToDate(); return SmoothScaffold( + backgroundColor: context.lightTheme() + ? context.extension().primaryLight + : null, appBar: SmoothAppBar( title: Semantics( label: _getTitleForAccessibility(appLocalizations, title), child: Text( title, - maxLines: 2, + maxLines: 1, + overflow: TextOverflow.ellipsis, ), ), + subTitle: Text( + getProductNameAndBrands(widget.product, appLocalizations), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), body: RefreshIndicator( onRefresh: () => _refreshProduct(context),