feat: custom horizontal preview

Closes #117

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-08 19:13:37 +08:00
parent 0b9d4d970a
commit 8d4294ba75
22 changed files with 255 additions and 97 deletions

View File

@@ -9,6 +9,7 @@ Widget htmlRender({
int? imgCount,
List<String>? imgList,
required double constrainedWidth,
Function(List<String>, int)? callback,
}) {
return SelectionArea(
child: Html(
@@ -49,9 +50,13 @@ Widget htmlRender({
tag: imgUrl,
child: GestureDetector(
onTap: () {
context.imageView(
imgList: [imgUrl],
);
if (callback != null) {
callback([imgUrl], 0);
} else {
context.imageView(
imgList: [imgUrl],
);
}
},
child: NetworkImgLayer(
width: isEmote ? 22 : constrainedWidth,