InputChatPhoto.fromJson constructor

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

Implementation

factory InputChatPhoto.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case InputChatPhotoPrevious.CONSTRUCTOR:
      return InputChatPhotoPrevious.fromJson(json);
    case InputChatPhotoStatic.CONSTRUCTOR:
      return InputChatPhotoStatic.fromJson(json);
    case InputChatPhotoAnimation.CONSTRUCTOR:
      return InputChatPhotoAnimation.fromJson(json);
    default:
      return const InputChatPhoto();
  }
}