fromJson static method

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

Implementation

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

  return InputMessageWidget(
    width: (json['width'] as int?) ?? 0,
    height: (json['height'] as int?) ?? 0,
    html: (json['html'] as String?) ?? '',
    publicData: (json['public_data'] as String?) ?? '',
    chatData: (json['chat_data'] as String?) ?? '',
    caption: FormattedText.fromJson(json['caption'] as Map<String, dynamic>?),
    showCaptionAboveMedia:
        (json['show_caption_above_media'] as bool?) ?? false,
    allowQueries: (json['allow_queries'] as bool?) ?? false,
    isShared: (json['is_shared'] as bool?) ?? false,
  );
}