From 30a134a7dff083694e0d2f962a99ad1439bf8716 Mon Sep 17 00:00:00 2001 From: lucien144 Date: Thu, 10 Aug 2023 12:36:05 +0200 Subject: [PATCH] fix: #412 --- lib/components/content_box_layout.dart | 37 ++++++++++++++++++-------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/lib/components/content_box_layout.dart b/lib/components/content_box_layout.dart index 0154f1f..83f186a 100644 --- a/lib/components/content_box_layout.dart +++ b/lib/components/content_box_layout.dart @@ -80,10 +80,19 @@ class ContentBoxLayout extends StatelessWidget { var children = []; content.attachments.forEach((attachment) { - children.add(PostHeroAttachment(attachment, images: content.images, blur: blur,)); + children.add(PostHeroAttachment( + attachment, + images: content.images, + blur: blur, + )); }); - return Wrap(children: children, spacing: 8, alignment: WrapAlignment.start, runSpacing: 8,); + return Wrap( + children: children, + spacing: 8, + alignment: WrapAlignment.start, + runSpacing: 8, + ); }); _layoutMap.putIfAbsent( @@ -114,20 +123,26 @@ class ContentBoxLayout extends StatelessWidget { if ((content.attachmentsWithFeatured['attachments'] as List).whereType().length > 0) { children.add(() { var children = (content.attachmentsWithFeatured['attachments'] as List).whereType().map((attachment) { - return Padding( - padding: const EdgeInsets.only(right: 8), - child: PostHeroAttachment( - attachment, - images: content.images, - size: Size(50, 50), - blur: blur, - )); + return PostHeroAttachment( + attachment, + images: content.images, + size: Size(50, 50), + blur: blur, + ); }).toList(); - return Row(children: children, mainAxisAlignment: MainAxisAlignment.start); + return Padding( + padding: EdgeInsets.only(top: 16), + child: Wrap( + children: children, + alignment: WrapAlignment.start, + spacing: 8, + runSpacing: 8, + )); }()); } return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: children, ); });