InputFile.fromJson constructor

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

Implementation

factory InputFile.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case InputFileId.CONSTRUCTOR:
      return InputFileId.fromJson(json);
    case InputFileRemote.CONSTRUCTOR:
      return InputFileRemote.fromJson(json);
    case InputFileLocal.CONSTRUCTOR:
      return InputFileLocal.fromJson(json);
    case InputFileGenerated.CONSTRUCTOR:
      return InputFileGenerated.fromJson(json);
    default:
      return const InputFile();
  }
}