refa image preview

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-02-14 10:16:48 +08:00
parent 8e726f49b2
commit beb7eb1aea
14 changed files with 1935 additions and 2066 deletions

View File

@@ -1,3 +1,5 @@
import 'package:PiliPlus/common/constants.dart';
enum SourceType { fileImage, networkImage, livePhoto }
class SourceModel {
@@ -14,4 +16,11 @@ class SourceModel {
this.width,
this.height,
});
bool get isLongPic {
if (width != null && height != null) {
return height! / width! > StyleString.imgMaxRatio;
}
return false;
}
}