Asset.fromJson constructor

Asset.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Asset.fromJson(Map<String, dynamic> json) {
  if (json['asset_type'] == Asset.TYPE_NATIVE) {
    return new AssetTypeNative();
  } else {
    return Asset.createNonNativeAsset(
        json['asset_code'], json['asset_issuer']);
  }
}