precheck video dimension

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-23 17:08:51 +08:00
parent efc202c10f
commit 5b5983ed50
32 changed files with 237 additions and 81 deletions

View File

@@ -9,10 +9,21 @@ class Dimension {
return null;
}
bool get isVertical =>
width != null && height != null ? height! > width! : false;
Dimension({this.width, this.height});
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
width: json['width'] as int?,
height: json['height'] as int?,
);
Dimension.fromJson(Map<String, dynamic> json) {
if (json['rotate'] == 1) {
width = json['height'] as int?;
height = json['width'] as int?;
} else {
width = json['width'] as int?;
height = json['height'] as int?;
}
}
@override
String toString() => 'width: $width, height: $height';
}