Files
PiliPlus/lib/models_new/video/video_shot/data.dart
My-Responsitories 5f8313901b tweaks (#1142)
* opt: unused layout

* mod: semantics

* opt: DanmakuMsg type

* opt: avoid cast

* opt: unnecessary_lambdas

* opt: use isEven

* opt: logger

* opt: invalid common page

* tweak

* opt: unify DynController
2025-08-27 12:01:53 +08:00

35 lines
885 B
Dart

import 'package:PiliPlus/utils/extension.dart';
class VideoShotData {
String? pvdata;
int imgXLen;
int imgYLen;
double imgXSize;
double imgYSize;
late final int totalPerImage = imgXLen * imgYLen;
List<String> image;
List<int> index;
VideoShotData({
this.pvdata,
required this.imgXLen,
required this.imgYLen,
required this.imgXSize,
required this.imgYSize,
required this.image,
required this.index,
});
factory VideoShotData.fromJson(Map<String, dynamic> json) => VideoShotData(
pvdata: json["pvdata"],
imgXLen: json["img_x_len"],
imgYLen: json["img_y_len"],
imgXSize: (json["img_x_size"] as num).toDouble(),
imgYSize: (json["img_y_size"] as num).toDouble(),
image: (json["image"] as List)
.map((e) => (e as String).http2https)
.toList(),
index: (json["index"] as List).fromCast(),
);
}