fromMap static method
override
Construct from Map.
Implementation
static InputMessageVoiceNote? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
if (_ != CONSTRUCTOR) return null;
var extra = _map['@extra'];
var clientId = _map['@clientId'];
var voice_note = InputFile.fromMap(_map['voice_note'])!;
var duration = _map['duration']! as int;
var waveform = _map['waveform']! as bytes;
var caption = FormattedText.fromMap(_map['caption']);
return InputMessageVoiceNote(
extra: extra,
clientId: clientId,
voice_note: voice_note,
duration: duration,
waveform: waveform,
caption: caption,
);
}