ChatAction.fromJson constructor

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

Parses whichever ChatAction subtype the JSON describes.

Implementation

factory ChatAction.fromJson(Map<String, dynamic> json) {
  final object = tdObjectFactories[json['@type']]?.call(json);
  return object is ChatAction ? object : UndecodedChatAction(json);
}