when<T> method

T when<T>({
  1. required T mRoleAdmin(),
  2. required T mRoleSecurity(),
})

Implementation

T when<T>({
  required T Function() mRoleAdmin,
  required T Function() mRoleSecurity,
}) =>
    {
      Role.mRoleAdmin: mRoleAdmin,
      Role.mRoleSecurity: mRoleSecurity,
    }[this]!();