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