when<T> method
T
when<T>({
- required T ban(),
- required T invite(),
- required T join(),
- required T knock(),
- required T leave(),
Implementation
T when<T>({
required T Function() ban,
required T Function() invite,
required T Function() join,
required T Function() knock,
required T Function() leave,
}) =>
{
Membership.ban: ban,
Membership.invite: invite,
Membership.join: join,
Membership.knock: knock,
Membership.leave: leave,
}[this]!();