max property Null safety

T max

A maximal element of the iterable.

The iterable must not be empty.

Implementation

T get max => maxOrNull ?? (throw StateError('No element'));