EnumIterableExtensions<T extends Enum> extension

Saropa extensions for Lists of Enums

on

Methods

byNameTry(String? name, {bool caseSensitive = true}) → T?

Available on Iterable<T>, provided by the EnumIterableExtensions extension

Finds and returns the first enum value in this list whose name property matches the given name, or null if no such value is found.
mostOccurrences() MapEntry<Enum, int>

Available on Iterable<T>, provided by the EnumIterableExtensions extension

Return a MapEntry with the most common value and its frequency.
sortedEnumValues() List<T>

Available on Iterable<T>, provided by the EnumIterableExtensions extension

Returns a list of enum values sorted alphabetically by name.