Compare commits
No commits in common. "e1ddd22e4e59a1dd037d303b34f68cf1455d1adf" and "724bd6592e2e48917e47d100f995507326f2d504" have entirely different histories.
e1ddd22e4e
...
724bd6592e
@ -34,17 +34,8 @@ class AutoCacheImage extends StatelessWidget {
|
|||||||
progressIndicatorBuilder: noProgressIndicator
|
progressIndicatorBuilder: noProgressIndicator
|
||||||
? null
|
? null
|
||||||
: (context, url, downloadProgress) => Center(
|
: (context, url, downloadProgress) => Center(
|
||||||
child: TweenAnimationBuilder(
|
child: CircularProgressIndicator(
|
||||||
tween: Tween(
|
value: downloadProgress.progress,
|
||||||
begin: 0,
|
|
||||||
end: downloadProgress.progress ?? 0,
|
|
||||||
),
|
|
||||||
duration: const Duration(milliseconds: 300),
|
|
||||||
builder: (context, value, _) => CircularProgressIndicator(
|
|
||||||
value: downloadProgress.progress != null
|
|
||||||
? value.toDouble()
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
errorWidget: noErrorWidget
|
errorWidget: noErrorWidget
|
||||||
@ -83,21 +74,12 @@ class AutoCacheImage extends StatelessWidget {
|
|||||||
ImageChunkEvent? loadingProgress) {
|
ImageChunkEvent? loadingProgress) {
|
||||||
if (loadingProgress == null) return child;
|
if (loadingProgress == null) return child;
|
||||||
return Center(
|
return Center(
|
||||||
child: TweenAnimationBuilder(
|
child: CircularProgressIndicator(
|
||||||
tween: Tween(
|
value: loadingProgress.expectedTotalBytes != null
|
||||||
begin: 0,
|
|
||||||
end: loadingProgress.expectedTotalBytes != null
|
|
||||||
? loadingProgress.cumulativeBytesLoaded /
|
? loadingProgress.cumulativeBytesLoaded /
|
||||||
loadingProgress.expectedTotalBytes!
|
loadingProgress.expectedTotalBytes!
|
||||||
: 0,
|
|
||||||
),
|
|
||||||
duration: const Duration(milliseconds: 300),
|
|
||||||
builder: (context, value, _) => CircularProgressIndicator(
|
|
||||||
value: loadingProgress.expectedTotalBytes != null
|
|
||||||
? value.toDouble()
|
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
errorBuilder: noErrorWidget
|
errorBuilder: noErrorWidget
|
||||||
|
@ -101,14 +101,11 @@ class _PostItemState extends State<PostItem> {
|
|||||||
onChange: (size) {
|
onChange: (size) {
|
||||||
setState(() => _contentHeight = size.height);
|
setState(() => _contentHeight = size.height);
|
||||||
},
|
},
|
||||||
child: SingleChildScrollView(
|
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
child: MarkdownTextContent(
|
child: MarkdownTextContent(
|
||||||
parentId: 'p${item.id}',
|
parentId: 'p${item.id}',
|
||||||
content: item.body['content'],
|
content: item.body['content'],
|
||||||
isAutoWarp: item.type == 'story',
|
isAutoWarp: item.type == 'story',
|
||||||
isSelectable: widget.isContentSelectable,
|
isSelectable: widget.isContentSelectable,
|
||||||
),
|
|
||||||
).paddingOnly(
|
).paddingOnly(
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 12,
|
right: 12,
|
||||||
@ -212,8 +209,6 @@ class _PostItemState extends State<PostItem> {
|
|||||||
onChange: (size) {
|
onChange: (size) {
|
||||||
setState(() => _contentHeight = size.height);
|
setState(() => _contentHeight = size.height);
|
||||||
},
|
},
|
||||||
child: SingleChildScrollView(
|
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
child: MarkdownTextContent(
|
child: MarkdownTextContent(
|
||||||
parentId: 'p${item.id}-embed',
|
parentId: 'p${item.id}-embed',
|
||||||
content: item.body['content'],
|
content: item.body['content'],
|
||||||
@ -224,7 +219,6 @@ class _PostItemState extends State<PostItem> {
|
|||||||
).paddingOnly(left: 12, right: 8),
|
).paddingOnly(left: 12, right: 8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
if (_contentHeight >= 320 && !widget.isFullContent)
|
if (_contentHeight >= 320 && !widget.isFullContent)
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
@ -377,22 +371,15 @@ class _PostFeaturedReplyWidget extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: snapshot.data!
|
children: snapshot.data!
|
||||||
.map(
|
.map(
|
||||||
(reply) => ClipRRect(
|
(reply) => Row(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
|
||||||
child: OpenContainer(
|
|
||||||
closedBuilder: (_, openContainer) => Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
AccountAvatar(
|
AccountAvatar(content: reply.author.avatar, radius: 10),
|
||||||
content: reply.author.avatar,
|
|
||||||
radius: 10,
|
|
||||||
),
|
|
||||||
const Gap(6),
|
const Gap(6),
|
||||||
Text(
|
Text(
|
||||||
reply.author.nick,
|
reply.author.nick,
|
||||||
style:
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
const TextStyle(fontWeight: FontWeight.bold),
|
|
||||||
),
|
),
|
||||||
const Gap(6),
|
const Gap(6),
|
||||||
Text(
|
Text(
|
||||||
@ -438,20 +425,6 @@ class _PostFeaturedReplyWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
).paddingSymmetric(horizontal: 12, vertical: 8),
|
).paddingSymmetric(horizontal: 12, vertical: 8),
|
||||||
openBuilder: (_, __) => TitleShell(
|
|
||||||
title: 'postDetail'.tr,
|
|
||||||
child: PostDetailScreen(
|
|
||||||
id: reply.id.toString(),
|
|
||||||
post: reply,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
closedElevation: 0,
|
|
||||||
openElevation: 0,
|
|
||||||
closedColor:
|
|
||||||
Theme.of(context).colorScheme.surfaceContainer,
|
|
||||||
openColor: Theme.of(context).colorScheme.surface,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
|
@ -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.3+2
|
version: 1.2.3+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