fromJson static method

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

Implementation

static BotVerificationParameters? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return BotVerificationParameters(
    iconCustomEmojiId:
        int.tryParse(
          (json['icon_custom_emoji_id'] as dynamic)?.toString() ?? '',
        ) ??
        0,
    organizationName: (json['organization_name'] as String?) ?? '',
    defaultCustomDescription: FormattedText.fromJson(
      tdMapFromJson(json['default_custom_description']),
    ),
    canSetCustomDescription:
        (json['can_set_custom_description'] as bool?) ?? false,
  );
}