AudioStream.fromJson constructor

AudioStream.fromJson(
  1. Map json_
)

Implementation

AudioStream.fromJson(core.Map json_)
    : this(
        bitrateBps: json_.containsKey('bitrateBps')
            ? json_['bitrateBps'] as core.int
            : null,
        channelCount: json_.containsKey('channelCount')
            ? json_['channelCount'] as core.int
            : null,
        channelLayout: json_.containsKey('channelLayout')
            ? (json_['channelLayout'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        codec:
            json_.containsKey('codec') ? json_['codec'] as core.String : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        languageCode: json_.containsKey('languageCode')
            ? json_['languageCode'] as core.String
            : null,
        mapping: json_.containsKey('mapping')
            ? (json_['mapping'] as core.List)
                .map((value) => AudioMapping.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        sampleRateHertz: json_.containsKey('sampleRateHertz')
            ? json_['sampleRateHertz'] as core.int
            : null,
      );