Compare commits
2 Commits
8378024490
...
f3ceb5f967
Author | SHA1 | Date | |
---|---|---|---|
f3ceb5f967 | |||
b5e2fa4c25 |
@ -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: Row(
|
title: Column(
|
||||||
|
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(
|
||||||
|
@ -341,64 +341,67 @@ 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 Card(
|
return Container(
|
||||||
margin: EdgeInsets.zero,
|
constraints: const BoxConstraints(maxWidth: 480),
|
||||||
child: Column(
|
child: Card(
|
||||||
children: snapshot.data!
|
margin: EdgeInsets.zero,
|
||||||
.map(
|
child: Column(
|
||||||
(x) => Row(
|
children: snapshot.data!
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
.map(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
(x) => Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
AccountAvatar(content: x.author.avatar, radius: 10),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
const Gap(6),
|
children: [
|
||||||
Text(
|
AccountAvatar(content: x.author.avatar, radius: 10),
|
||||||
x.author.nick,
|
const Gap(6),
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
Text(
|
||||||
),
|
x.author.nick,
|
||||||
const Gap(6),
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
Text(
|
|
||||||
format(
|
|
||||||
x.publishedAt?.toLocal() ?? DateTime.now(),
|
|
||||||
locale: 'en_short',
|
|
||||||
),
|
),
|
||||||
).paddingOnly(top: 0.5),
|
const Gap(6),
|
||||||
const Gap(8),
|
Text(
|
||||||
Expanded(
|
format(
|
||||||
child: Column(
|
x.publishedAt?.toLocal() ?? DateTime.now(),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
locale: 'en_short',
|
||||||
children: [
|
),
|
||||||
MarkdownTextContent(
|
).paddingOnly(top: 0.5),
|
||||||
content: x.body['content'],
|
const Gap(8),
|
||||||
parentId: 'p${item.id}-featured-reply${x.id}',
|
Expanded(
|
||||||
),
|
child: Column(
|
||||||
if (x.body['attachments'] is List &&
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
x.body['attachments'].length > 0)
|
children: [
|
||||||
Row(
|
MarkdownTextContent(
|
||||||
children: [
|
content: x.body['content'],
|
||||||
Icon(
|
parentId: 'p${item.id}-featured-reply${x.id}',
|
||||||
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()
|
||||||
|
@ -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.1+41
|
version: 1.2.2+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.3.4 <4.0.0"
|
sdk: ">=3.3.4 <4.0.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user