show img size

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-16 17:23:09 +08:00
parent 0c60800b36
commit 88b7f82406
22 changed files with 122 additions and 38 deletions

View File

@@ -42,10 +42,11 @@ class ArticleController extends CommonDynController {
opusData?.modules.moduleContent ?? articleData?.opus?.content;
List<SourceModel>? _images;
List<SourceModel> images() => _images ??= opus!
.where((e) => e.paraType == 2 && e.pic != null)
.map((e) => SourceModel(url: e.pic!.pics!.first.url!))
.toList();
List<SourceModel> images() =>
_images ??= opus!.where((e) => e.paraType == 2 && e.pic != null).map((e) {
final pic = e.pic!.pics!.first;
return SourceModel(url: pic.url!, size: pic.size);
}).toList();
@override
void onInit() {