MatexPairMetadata.fromJson constructor
MatexPairMetadata.fromJson(
- Map<String, dynamic> json
)
Implementation
factory MatexPairMetadata.fromJson(Map<String, dynamic> json) {
var pipMetadata = json['pip'] as Map<String, dynamic>?;
final lots = json['lots'] as Map<String, dynamic>?;
return MatexPairMetadata(
type: MatexPairTypeMetadata.fromCache(json['type'] as String),
counterCode: json['counter'] as String,
baseCode: json['base'] as String,
lots: lots != null
? MatexPairLotsMetadata.fromJson(lots)
: MatexPairLotsMetadata.defaultMetatada(),
pip: pipMetadata != null
? MatexPairPipMetadata.fromJson(pipMetadata)
: MatexPairPipMetadata.defaultMetatada(),
);
}