Voice.fromJson constructor

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

Creates a Voice object from JSON object

Implementation

factory Voice.fromJson(Map<String, dynamic> json) {
  return Voice(
    fileId: json['file_id']!,
    fileUniqueId: json['file_unique_id']!,
    duration: json['duration']!,
    mimeType: json['mime_type'],
    fileSize: json['file_size'],
  );
}