AttachmentMenuBot.fromJson constructor

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

Parse from a json

Implementation

factory AttachmentMenuBot.fromJson(Map<String, dynamic> json) =>
    AttachmentMenuBot(
      botUserId: json['bot_user_id'],
      supportsSelfChat: json['supports_self_chat'],
      supportsUserChats: json['supports_user_chats'],
      supportsBotChats: json['supports_bot_chats'],
      supportsGroupChats: json['supports_group_chats'],
      supportsChannelChats: json['supports_channel_chats'],
      supportsSettings: json['supports_settings'],
      requestWriteAccess: json['request_write_access'],
      name: json['name'],
      nameColor: json['name_color'] == null
          ? null
          : AttachmentMenuBotColor.fromJson(json['name_color']),
      defaultIcon: json['default_icon'] == null
          ? null
          : File.fromJson(json['default_icon']),
      iosStaticIcon: json['ios_static_icon'] == null
          ? null
          : File.fromJson(json['ios_static_icon']),
      iosAnimatedIcon: json['ios_animated_icon'] == null
          ? null
          : File.fromJson(json['ios_animated_icon']),
      androidIcon: json['android_icon'] == null
          ? null
          : File.fromJson(json['android_icon']),
      macosIcon: json['macos_icon'] == null
          ? null
          : File.fromJson(json['macos_icon']),
      iconColor: json['icon_color'] == null
          ? null
          : AttachmentMenuBotColor.fromJson(json['icon_color']),
      webAppPlaceholder: json['web_app_placeholder'] == null
          ? null
          : File.fromJson(json['web_app_placeholder']),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );