fix: article

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-08 23:50:17 +08:00
parent 76545397d4
commit 634612c1a2
3 changed files with 4 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ Widget articleContent({
Function(List<String>, int)? callback,
required double maxWidth,
}) {
debugPrint('articleContent');
List<String>? imgList = list
.where((item) => item.pic != null)
.toList()

View File

@@ -13,6 +13,7 @@ Widget htmlRender({
required double constrainedWidth,
Function(List<String>, int)? callback,
}) {
debugPrint('htmlRender');
return SelectionArea(
child: Html(
data: htmlContent,

View File

@@ -568,12 +568,12 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
sliver: Obx(
() => _htmlRenderCtr.loaded.value
? _htmlRenderCtr.response['isJsonContent'] == true
? LayoutBuilder(
? SliverLayoutBuilder(
builder: (context, constraints) => articleContent(
context: context,
list: _htmlRenderCtr.response['content'],
callback: _getImageCallback,
maxWidth: constraints.maxWidth,
maxWidth: constraints.crossAxisExtent,
),
)
: SliverToBoxAdapter(