maybeWhen<T> method

T maybeWhen<T>({
  1. T? mRoleAdmin()?,
  2. T? mRoleSecurity()?,
  3. 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();