when<T> method

T when<T>({
  1. required T email(),
  2. required T msisdn(),
})

Implementation

T when<T>({
  required T Function() email,
  required T Function() msisdn,
}) =>
    {
      ThirdPartyIdentifierMedium.email: email,
      ThirdPartyIdentifierMedium.msisdn: msisdn,
    }[this]!();