when<T> method

T when<T>({
  1. required T contentBody(),
  2. required T contentName(),
  3. required T contentTopic(),
})

Implementation

T when<T>({
  required T Function() contentBody,
  required T Function() contentName,
  required T Function() contentTopic,
}) =>
    {
      KeyKind.contentBody: contentBody,
      KeyKind.contentName: contentName,
      KeyKind.contentTopic: contentTopic,
    }[this]!();