fromMap static method
override
Construct from Map.
Implementation
static UserPrivacySettingRule? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
switch (_) {
case 'userPrivacySettingRuleRestrictChatMembers':
return UserPrivacySettingRuleRestrictChatMembers.fromMap(_map);
case 'userPrivacySettingRuleAllowChatMembers':
return UserPrivacySettingRuleAllowChatMembers.fromMap(_map);
case 'userPrivacySettingRuleRestrictUsers':
return UserPrivacySettingRuleRestrictUsers.fromMap(_map);
case 'userPrivacySettingRuleRestrictAll':
return UserPrivacySettingRuleRestrictAll.fromMap(_map);
case 'userPrivacySettingRuleAllowAll':
return UserPrivacySettingRuleAllowAll.fromMap(_map);
case 'userPrivacySettingRuleAllowContacts':
return UserPrivacySettingRuleAllowContacts.fromMap(_map);
case 'userPrivacySettingRuleRestrictContacts':
return UserPrivacySettingRuleRestrictContacts.fromMap(_map);
case 'userPrivacySettingRuleAllowUsers':
return UserPrivacySettingRuleAllowUsers.fromMap(_map);
case null:
default:
return null;
}
}