highest property

UserCapability get highest

Returns the highest UserCapability in the list.

If the list is empty, UserCapability.student is returned.

Implementation

UserCapability get highest => reduce((value, element) => value.value < element.value ? value : element);