MessageSender.fromJson constructor

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

Parses whichever MessageSender subtype the JSON describes.

Implementation

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