Compare commits

..

No commits in common. "f3ceb5f967a92bdee7c2ce5b8c797c05ae69aece" and "8378024490eba908dba65204f8121883286fb8fc" have entirely different histories.

3 changed files with 59 additions and 62 deletions

View File

@ -183,18 +183,18 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
children: [ children: [
ListTile( ListTile(
tileColor: Theme.of(context).colorScheme.surfaceContainerLow, tileColor: Theme.of(context).colorScheme.surfaceContainerLow,
title: Column( title: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
_editorController.title ?? 'title'.tr, _editorController.title ?? 'title'.tr,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
const Gap(6),
if (_editorController.aliasController.text.isNotEmpty) if (_editorController.aliasController.text.isNotEmpty)
Badge( Badge(
label: Text('#${_editorController.aliasController.text}'), label: Text('#${_editorController.aliasController.text}'),
).paddingOnly(bottom: 2), ),
], ],
), ),
subtitle: Text( subtitle: Text(

View File

@ -341,67 +341,64 @@ class _PostItemState extends State<PostItem> {
if (!snapshot.hasData || snapshot.data!.isEmpty) { if (!snapshot.hasData || snapshot.data!.isEmpty) {
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return Container( return Card(
constraints: const BoxConstraints(maxWidth: 480), margin: EdgeInsets.zero,
child: Card( child: Column(
margin: EdgeInsets.zero, children: snapshot.data!
child: Column( .map(
children: snapshot.data! (x) => Row(
.map( mainAxisAlignment: MainAxisAlignment.center,
(x) => Row( crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, children: [
crossAxisAlignment: CrossAxisAlignment.start, AccountAvatar(content: x.author.avatar, radius: 10),
children: [ const Gap(6),
AccountAvatar(content: x.author.avatar, radius: 10), Text(
const Gap(6), x.author.nick,
Text( style: const TextStyle(fontWeight: FontWeight.bold),
x.author.nick, ),
style: const TextStyle(fontWeight: FontWeight.bold), const Gap(6),
Text(
format(
x.publishedAt?.toLocal() ?? DateTime.now(),
locale: 'en_short',
), ),
const Gap(6), ).paddingOnly(top: 0.5),
Text( const Gap(8),
format( Expanded(
x.publishedAt?.toLocal() ?? DateTime.now(), child: Column(
locale: 'en_short', crossAxisAlignment: CrossAxisAlignment.start,
), children: [
).paddingOnly(top: 0.5), MarkdownTextContent(
const Gap(8), content: x.body['content'],
Expanded( parentId: 'p${item.id}-featured-reply${x.id}',
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, if (x.body['attachments'] is List &&
children: [ x.body['attachments'].length > 0)
MarkdownTextContent( Row(
content: x.body['content'], children: [
parentId: 'p${item.id}-featured-reply${x.id}', Icon(
Icons.file_copy,
size: 15,
color: unFocusColor,
).paddingOnly(right: 5),
Text(
'attachmentHint'.trParams(
{
'count': x.body['attachments'].length
.toString()
},
),
style: TextStyle(color: unFocusColor),
)
],
), ),
if (x.body['attachments'] is List && ],
x.body['attachments'].length > 0)
Row(
children: [
Icon(
Icons.file_copy,
size: 15,
color: unFocusColor,
).paddingOnly(right: 5),
Text(
'attachmentHint'.trParams(
{
'count': x.body['attachments'].length
.toString()
},
),
style: TextStyle(color: unFocusColor),
)
],
),
],
),
), ),
], ),
).paddingSymmetric(horizontal: 12, vertical: 8), ],
) ).paddingSymmetric(horizontal: 12, vertical: 8),
.toList(), )
), .toList(),
), ),
) )
.animate() .animate()

View File

@ -2,7 +2,7 @@ name: solian
description: "The Solar Network App" description: "The Solar Network App"
publish_to: "none" publish_to: "none"
version: 1.2.2+1 version: 1.2.1+41
environment: environment:
sdk: ">=3.3.4 <4.0.0" sdk: ">=3.3.4 <4.0.0"