MessageSelfDestructType.fromJson constructor

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

Parses whichever MessageSelfDestructType subtype the JSON describes.

Implementation

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