map<TResult extends Object?> method
TResult
map<TResult extends Object?>({
- required TResult allowAll(),
- required TResult allowContacts(),
- required TResult allowBots(),
- required TResult allowPremiumUsers(),
- required TResult allowUsers(),
- required TResult allowChatMembers(),
- required TResult restrictAll(),
- required TResult restrictContacts(),
- required TResult restrictBots(),
- required TResult restrictUsers(),
- required TResult restrictChatMembers(),
Implementation
TResult map<TResult extends Object?>({
required TResult Function(UserPrivacySettingRuleAllowAll value) allowAll,
required TResult Function(UserPrivacySettingRuleAllowContacts value)
allowContacts,
required TResult Function(UserPrivacySettingRuleAllowBots value) allowBots,
required TResult Function(UserPrivacySettingRuleAllowPremiumUsers value)
allowPremiumUsers,
required TResult Function(UserPrivacySettingRuleAllowUsers value)
allowUsers,
required TResult Function(UserPrivacySettingRuleAllowChatMembers value)
allowChatMembers,
required TResult Function(UserPrivacySettingRuleRestrictAll value)
restrictAll,
required TResult Function(UserPrivacySettingRuleRestrictContacts value)
restrictContacts,
required TResult Function(UserPrivacySettingRuleRestrictBots value)
restrictBots,
required TResult Function(UserPrivacySettingRuleRestrictUsers value)
restrictUsers,
required TResult Function(UserPrivacySettingRuleRestrictChatMembers value)
restrictChatMembers,
}) {
switch (getConstructor()) {
case UserPrivacySettingRuleAllowAll.constructor:
return allowAll.call(this as UserPrivacySettingRuleAllowAll);
case UserPrivacySettingRuleAllowContacts.constructor:
return allowContacts.call(this as UserPrivacySettingRuleAllowContacts);
case UserPrivacySettingRuleAllowBots.constructor:
return allowBots.call(this as UserPrivacySettingRuleAllowBots);
case UserPrivacySettingRuleAllowPremiumUsers.constructor:
return allowPremiumUsers
.call(this as UserPrivacySettingRuleAllowPremiumUsers);
case UserPrivacySettingRuleAllowUsers.constructor:
return allowUsers.call(this as UserPrivacySettingRuleAllowUsers);
case UserPrivacySettingRuleAllowChatMembers.constructor:
return allowChatMembers
.call(this as UserPrivacySettingRuleAllowChatMembers);
case UserPrivacySettingRuleRestrictAll.constructor:
return restrictAll.call(this as UserPrivacySettingRuleRestrictAll);
case UserPrivacySettingRuleRestrictContacts.constructor:
return restrictContacts
.call(this as UserPrivacySettingRuleRestrictContacts);
case UserPrivacySettingRuleRestrictBots.constructor:
return restrictBots.call(this as UserPrivacySettingRuleRestrictBots);
case UserPrivacySettingRuleRestrictUsers.constructor:
return restrictUsers.call(this as UserPrivacySettingRuleRestrictUsers);
case UserPrivacySettingRuleRestrictChatMembers.constructor:
return restrictChatMembers
.call(this as UserPrivacySettingRuleRestrictChatMembers);
}
throw StateError('not handled type Generator');
}