PubMagicMetadata: Add w and h property
This commit is contained in:
parent
5615c6bd67
commit
ed541a6f79
|
@ -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],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue