FileMessage.fromJson constructor

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

Implementation

factory FileMessage.fromJson(Map<String, dynamic> json) {
  Map<String, dynamic>? file = json['file'];
  if (file != null) {
    json['url'] = file['url'];
    json['type'] = file['type'];
    json['size'] = file['size'];
    json['name'] = file['name'];
    json['data'] = file['data'];
    json['require_auth'] = json['require_auth'] ?? file['require_auth'];
  }
  return _$FileMessageFromJson(json);
}