JsWatchAsset.fromJson constructor
JsWatchAsset.fromJson(
- Map<String, dynamic>? json
)
Implementation
factory JsWatchAsset.fromJson(Map<String, dynamic>? json) {
/**
* {
type: payload.type,
contract: options.address,
symbol: options.symbol,
decimals: options.decimals || 0,
* }
* **/
json ??= {};
return JsWatchAsset(
type: json['type'] as String? ?? '',
contract: json['contract'] as String? ?? '',
symbol: json['symbol'] as String? ?? '',
decimals: json['decimals'] ?? 0,
image: json['image'] as String? ?? '',
tokenId: json['tokenId'] as String? ?? '',
);
}