From 30ffdb1a3969ee24282319ce50bb965a33fce0d6 Mon Sep 17 00:00:00 2001 From: mishapark Date: Fri, 11 Aug 2023 20:05:02 -0400 Subject: [PATCH] fixed crop and added padding --- .../knowledge_panel_page.dart | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) 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 31fdfceefbb..8bb9acb1d05 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 @@ -62,18 +62,32 @@ class _KnowledgePanelPageState extends State ), body: RefreshIndicator( onRefresh: () => _refreshProduct(context), - child: SingleChildScrollView( + child: CustomScrollView( physics: const AlwaysScrollableScrollPhysics(), - child: SmoothCard( - padding: const EdgeInsets.all( - SMALL_SPACE, - ), - child: KnowledgePanelExpandedCard( - panelId: widget.panelId, - product: upToDateProduct, - isInitiallyExpanded: true, - ), - ), + slivers: [ + SliverToBoxAdapter( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.only( + bottom: SMALL_SPACE, + top: SMALL_SPACE, + ), + child: SmoothCard( + padding: const EdgeInsets.all( + SMALL_SPACE, + ), + child: KnowledgePanelExpandedCard( + panelId: widget.panelId, + product: upToDateProduct, + isInitiallyExpanded: true, + ), + ), + ), + ], + ), + ) + ], ), ), );