mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 03:06:59 +08:00
@@ -1,5 +1,3 @@
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
|
||||
enum SourceType { fileImage, networkImage, livePhoto }
|
||||
|
||||
class SourceModel {
|
||||
@@ -8,6 +6,7 @@ class SourceModel {
|
||||
final String? liveUrl;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final bool isLongPic;
|
||||
|
||||
const SourceModel({
|
||||
this.sourceType = SourceType.networkImage,
|
||||
@@ -15,12 +14,6 @@ class SourceModel {
|
||||
this.liveUrl,
|
||||
this.width,
|
||||
this.height,
|
||||
this.isLongPic = false,
|
||||
});
|
||||
|
||||
bool get isLongPic {
|
||||
if (width != null && height != null) {
|
||||
return height! / width! > StyleString.imgMaxRatio;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user