max property Null safety

num max

A maximal element of the iterable.

The iterable must not be empty.

Implementation

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