convertMapToObject function
Converts a decoded TDLib JSON map. Unknown types become UndecodedTdObject.
Implementation
TdObject convertMapToObject(Map<String, dynamic> json) {
final factory = tdObjectFactories[json['@type']];
return factory != null ? factory(json) : UndecodedTdObject(json);
}