fromMap static method
override
Construct from Map.
Implementation
static CheckChatUsernameResult? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
switch (_) {
case 'checkChatUsernameResultUsernameInvalid':
return CheckChatUsernameResultUsernameInvalid.fromMap(_map);
case 'checkChatUsernameResultUsernameOccupied':
return CheckChatUsernameResultUsernameOccupied.fromMap(_map);
case 'checkChatUsernameResultUsernamePurchasable':
return CheckChatUsernameResultUsernamePurchasable.fromMap(_map);
case 'checkChatUsernameResultPublicChatsTooMany':
return CheckChatUsernameResultPublicChatsTooMany.fromMap(_map);
case 'checkChatUsernameResultPublicGroupsUnavailable':
return CheckChatUsernameResultPublicGroupsUnavailable.fromMap(_map);
case 'checkChatUsernameResultOk':
return CheckChatUsernameResultOk.fromMap(_map);
case null:
default:
return null;
}
}