diff --git a/packages/smooth_app/lib/helpers/product_cards_helper.dart b/packages/smooth_app/lib/helpers/product_cards_helper.dart index f1eef8c282e..1535b5a4e19 100644 --- a/packages/smooth_app/lib/helpers/product_cards_helper.dart +++ b/packages/smooth_app/lib/helpers/product_cards_helper.dart @@ -97,13 +97,16 @@ Widget buildProductSmoothCard({ SmoothCard( margin: margin, padding: padding, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (header != null) header, - body, - ], - ), + child: switch (header) { + Object _ => Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (header != null) header, + body, + ], + ), + _ => body + }, ); // used to be in now defunct `AttributeListExpandable` diff --git a/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_card.dart b/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_card.dart index 4966f07bd39..b40ff5a410a 100644 --- a/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_card.dart +++ b/packages/smooth_app/lib/knowledge_panel/knowledge_panels/knowledge_panel_card.dart @@ -63,10 +63,11 @@ class KnowledgePanelCard extends StatelessWidget { ), ), child: KnowledgePanelsBuilder.getPanelSummaryWidget( - panel, - isClickable: isClickable, - margin: EdgeInsets.zero, - ), + panel, + isClickable: isClickable, + margin: EdgeInsets.zero, + ) ?? + const SizedBox(), ), ); }