maybeWhen<T> method
T
maybeWhen<T>({
- T? mRoleAdmin()?,
- T? mRoleSecurity()?,
- required T orElse(),
Implementation
T maybeWhen<T>({
T? Function()? mRoleAdmin,
T? Function()? mRoleSecurity,
required T Function() orElse,
}) =>
{
Role.mRoleAdmin: mRoleAdmin,
Role.mRoleSecurity: mRoleSecurity,
}[this]
?.call() ??
orElse();