EnumUtils extension

on

Methods

when<R>(Map<Enum, R Function()> map) → R

Available on Enum, provided by the EnumUtils extension

A when function for Enums. calling the function corresponding to the Enum of the object.
whenOrElse<R>(Map<Enum, R Function()> map, {required R orElse()}) → R

Available on Enum, provided by the EnumUtils extension

A when or else function for Enums. It takes a Map of Enums to functions, and returns the result of calling the function corresponding to the Enum of the object.