mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 03:31:09 +08:00
19 lines
364 B
Dart
19 lines
364 B
Dart
class Dimension {
|
|
int? width;
|
|
int? height;
|
|
|
|
bool? get cacheWidth {
|
|
if (width != null && height != null) {
|
|
return width! <= height!;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
Dimension({this.width, this.height});
|
|
|
|
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
|
|
width: json['width'] as int?,
|
|
height: json['height'] as int?,
|
|
);
|
|
}
|