🎨 Optimize the null check in list
This commit is contained in:
@@ -478,10 +478,7 @@ class PostItem extends HookConsumerWidget {
|
||||
|
||||
final translationSection = Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
if (translatedWidget != null) translatedWidget,
|
||||
if (translatableWidget != null) translatableWidget,
|
||||
],
|
||||
children: [?translatedWidget, ?translatableWidget],
|
||||
);
|
||||
|
||||
return Column(
|
||||
|
||||
@@ -854,7 +854,7 @@ class PostHeader extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
if (trailing != null) trailing!,
|
||||
?trailing,
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -1142,7 +1142,7 @@ class PostBody extends ConsumerWidget {
|
||||
attachments: item.attachments,
|
||||
noMentionChip: item.fediverseUri != null,
|
||||
),
|
||||
if (translationSection != null) translationSection!,
|
||||
?translationSection,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user