mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: article
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -13,6 +13,7 @@ Widget articleContent({
|
|||||||
Function(List<String>, int)? callback,
|
Function(List<String>, int)? callback,
|
||||||
required double maxWidth,
|
required double maxWidth,
|
||||||
}) {
|
}) {
|
||||||
|
debugPrint('articleContent');
|
||||||
List<String>? imgList = list
|
List<String>? imgList = list
|
||||||
.where((item) => item.pic != null)
|
.where((item) => item.pic != null)
|
||||||
.toList()
|
.toList()
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Widget htmlRender({
|
|||||||
required double constrainedWidth,
|
required double constrainedWidth,
|
||||||
Function(List<String>, int)? callback,
|
Function(List<String>, int)? callback,
|
||||||
}) {
|
}) {
|
||||||
|
debugPrint('htmlRender');
|
||||||
return SelectionArea(
|
return SelectionArea(
|
||||||
child: Html(
|
child: Html(
|
||||||
data: htmlContent,
|
data: htmlContent,
|
||||||
|
|||||||
@@ -568,12 +568,12 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
|
|||||||
sliver: Obx(
|
sliver: Obx(
|
||||||
() => _htmlRenderCtr.loaded.value
|
() => _htmlRenderCtr.loaded.value
|
||||||
? _htmlRenderCtr.response['isJsonContent'] == true
|
? _htmlRenderCtr.response['isJsonContent'] == true
|
||||||
? LayoutBuilder(
|
? SliverLayoutBuilder(
|
||||||
builder: (context, constraints) => articleContent(
|
builder: (context, constraints) => articleContent(
|
||||||
context: context,
|
context: context,
|
||||||
list: _htmlRenderCtr.response['content'],
|
list: _htmlRenderCtr.response['content'],
|
||||||
callback: _getImageCallback,
|
callback: _getImageCallback,
|
||||||
maxWidth: constraints.maxWidth,
|
maxWidth: constraints.crossAxisExtent,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: SliverToBoxAdapter(
|
: SliverToBoxAdapter(
|
||||||
|
|||||||
Reference in New Issue
Block a user