fromJson static method

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

Implementation

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

  return RichTextBotCommand(
    text: RichText.fromJson(tdMapFromJson(json['text'])),
    botCommand: (json['bot_command'] as String?) ?? '',
  );
}