SuiObject.fromJson constructor
SuiObject.fromJson(
- dynamic data
Implementation
factory SuiObject.fromJson(dynamic data) {
SuiMoveObject? content;
if(data['content']!=null){
content = SuiMoveObject.fromJson(data['content']);
}
SuiRawMoveObject? bcs;
if(data['bcs']!=null){
bcs = SuiRawMoveObject.fromJson(data['bcs']);
}
ObjectOwner? owner;
if(data['owner']!=null){
owner = ObjectOwner.fromJson(data['owner']);
}
DisplayFieldsResponse? display;
if (data['display'] != null) {
display = DisplayFieldsResponse.fromJson(data['display']);
}
return SuiObject(
data['objectId'],
data['digest'],
int.parse(data['version']),
data['type'],
content,
bcs,
owner,
data['previousTransaction'],
data['storageRebate'],
display,
);
}