EnumPlusListExtension<T extends EnumPlus> extension
- on
-
- Iterable<
T>
- Iterable<
Methods
-
coerce(
dynamic enumNameOrValue) → T? - Attempt to instantiate a new Enum using the given key or value.
-
fromFriendlyName(
String friendlyName) → T - Make an enum instance from a given friendly name.
-
fromFriendlyNames(
List< String> friendlyNames) → List<T> - Get enums from friendly names.
-
fromName(
String name) → T - Make an enum instance from a given key.
-
fromNames(
List< String> names) → List<T> - Get enums from names.
-
fromValue(
dynamic value) → T - Make a new instance from an enum value.
-
fromValues(
List values) → List< T> - Return instances from enum values
-
getFriendlyNames(
{List? values}) → List< String> - Get all or a custom set of the enum friendly names.
-
getFriendlyNamesExcept(
List values) → List< String> - Return friendly names of all the enums except the given values.
-
getName(
dynamic value) → String - Get the name for a single enum value.
-
getNames(
{List? values}) → List< String> - Get all or a custom set of the enum names.
-
getNamesExcept(
List values) → List< String> - Return names of all the enums except the given values.
-
getRandom(
) → T - Get a random instance of the enum.
-
getRandomFriendlyName(
) → String - Get a random friendly name of the enum.
-
getRandomName(
) → String - Get a random name of the enum.
-
getRandomValue(
) → dynamic - Get a random value of the enum.
-
getValue(
String name) → dynamic - Get the value for a single enum key.
-
getValues(
{List< String> ? names}) → List - Get all or a custom set of the enum values.
-
getValuesExcept(
List values) → List - Return values of all the enums except the given values.
-
hasFriendlyName(
String friendlyName) → bool - Check that the enum contains a specific friendly name.
-
hasName(
String name) → bool - Check that the enum contains a specific name.
-
hasValue(
dynamic value) → bool - Check that the enum contains a specific value.
-
toListExcept(
List values) → List< T> - Return instances of all the enums except the given values.