AvailableTransport.fromJson constructor

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

Implementation

AvailableTransport.fromJson(Map<String, dynamic> json) {
  transferFormats = [];

  transport = httpTransportTypeFromString(json['transport']);
  List<dynamic>? formats = json['transferFormats'];
  if (formats == null) {
    return;
  }
  for (var i = 0; i < formats.length; i++) {
    transferFormats!.add(getTransferFormatFromString(formats[i]));
  }
}