fromJson static method

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

Implementation

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

  return InlineButton(
    text: RichText.fromJson(json['text'] as Map<String, dynamic>?)!,
    style: ButtonStyle.fromJson(json['style'] as Map<String, dynamic>?)!,
    type: InlineKeyboardButtonType.fromJson(
        json['type'] as Map<String, dynamic>?)!,
  );
}