highest property

UserCapability 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.index < element.index ? value : element);