fromJson static method
Inherited by: UserPrivacySettingRuleAllowAll UserPrivacySettingRuleAllowBots UserPrivacySettingRuleAllowChatMembers UserPrivacySettingRuleAllowContacts UserPrivacySettingRuleAllowPremiumUsers UserPrivacySettingRuleAllowUsers UserPrivacySettingRuleRestrictAll UserPrivacySettingRuleRestrictBots UserPrivacySettingRuleRestrictChatMembers UserPrivacySettingRuleRestrictContacts UserPrivacySettingRuleRestrictUsers
Implementation
static UserPrivacySettingRuleRestrictChatMembers? fromJson(
Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return UserPrivacySettingRuleRestrictChatMembers(
chatIds: List<int>.from(
((json['chat_ids'] as List<dynamic>?) ?? <dynamic>[])
.map((item) =>
(item is int ? item : int.tryParse(item.toString()) ?? 0))
.toList()),
);
}