PubMagicMetadata: Add w and h property

This commit is contained in:
Neeraj Gupta 2023-04-11 10:28:49 +05:30
parent 5615c6bd67
commit ed541a6f79
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -17,6 +17,8 @@ const pubMagicKeyEditedTime = 'editedTime';
const pubMagicKeyEditedName = 'editedName'; const pubMagicKeyEditedName = 'editedName';
const pubMagicKeyCaption = "caption"; const pubMagicKeyCaption = "caption";
const pubMagicKeyUploaderName = "uploaderName"; const pubMagicKeyUploaderName = "uploaderName";
const publicMagicKeyWidth = 'w';
const publicMagicKeyHeight = 'h';
class MagicMetadata { class MagicMetadata {
// 0 -> visible // 0 -> visible
@ -44,12 +46,16 @@ class PubMagicMetadata {
String? editedName; String? editedName;
String? caption; String? caption;
String? uploaderName; String? uploaderName;
int? w;
int? h;
PubMagicMetadata({ PubMagicMetadata({
this.editedTime, this.editedTime,
this.editedName, this.editedName,
this.caption, this.caption,
this.uploaderName, this.uploaderName,
this.w,
this.h,
}); });
factory PubMagicMetadata.fromEncodedJson(String encodedJson) => factory PubMagicMetadata.fromEncodedJson(String encodedJson) =>
@ -65,6 +71,8 @@ class PubMagicMetadata {
editedName: map[pubMagicKeyEditedName], editedName: map[pubMagicKeyEditedName],
caption: map[pubMagicKeyCaption], caption: map[pubMagicKeyCaption],
uploaderName: map[pubMagicKeyUploaderName], uploaderName: map[pubMagicKeyUploaderName],
w: map[publicMagicKeyWidth],
h: map[publicMagicKeyHeight],
); );
} }
} }