feat: 图文动态详情页&评论渲染

This commit is contained in:
guozhigq
2023-06-27 12:23:20 +08:00
parent 532ad52c17
commit bc8be693a8
20 changed files with 863 additions and 478 deletions

View File

@ -26,14 +26,14 @@ Widget picWidget(item, context) {
Get.toNamed('/preview',
arguments: {'initialPage': i, 'imgList': picList});
},
child: Hero(
tag: pictures[i].src,
child: NetworkImgLayer(
src: pictures[i].src ?? pictures[i].url,
width: box.maxWidth,
height: box.maxWidth,
),
// child: Hero(
// tag: pictures[i].src ?? pictures[i].url,
child: NetworkImgLayer(
src: pictures[i].src ?? pictures[i].url,
width: box.maxWidth,
height: box.maxWidth,
),
// ),
);
},
),
@ -53,6 +53,10 @@ Widget picWidget(item, context) {
if (len == 1) {
aspectRatio = pictures.first.width / pictures.first.height;
height = pictures.first.height * maxWidth / pictures.first.width;
if (pictures.first.width != 1920) {
crossCount = 2;
height = maxWidth / 2 / aspectRatio;
}
} else {
aspectRatio = 1;
height = maxWidth /
@ -62,7 +66,6 @@ Widget picWidget(item, context) {
: len ~/ crossCount + 1) +
6;
}
return Container(
padding: const EdgeInsets.only(top: 4),
decoration: BoxDecoration(