ChatActionBar.fromJson constructor

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

Implementation

factory ChatActionBar.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case ChatActionBarReportSpam.CONSTRUCTOR:
      return ChatActionBarReportSpam.fromJson(json);
    case ChatActionBarReportUnrelatedLocation.CONSTRUCTOR:
      return ChatActionBarReportUnrelatedLocation.fromJson(json);
    case ChatActionBarInviteMembers.CONSTRUCTOR:
      return ChatActionBarInviteMembers.fromJson(json);
    case ChatActionBarReportAddBlock.CONSTRUCTOR:
      return ChatActionBarReportAddBlock.fromJson(json);
    case ChatActionBarAddContact.CONSTRUCTOR:
      return ChatActionBarAddContact.fromJson(json);
    case ChatActionBarSharePhoneNumber.CONSTRUCTOR:
      return ChatActionBarSharePhoneNumber.fromJson(json);
    case ChatActionBarJoinRequest.CONSTRUCTOR:
      return ChatActionBarJoinRequest.fromJson(json);
    default:
      return const ChatActionBar();
  }
}