AudioPcma.fromJson constructor

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

Creates from JSON.

Implementation

factory AudioPcma.fromJson(Map<String, dynamic> json) {
  if (json['type'] != 'audio/pcma') {
    throw FormatException(
      'AudioPcma.fromJson expected type "audio/pcma", got ${json['type']}',
    );
  }
  return const AudioPcma();
}