min property
T
get
min
Returns the minimum value in the list.
If the list is empty, a StateError is thrown with the message 'No element'.
Returns the minimum value in the list.
Example:
List<int> numbers = [1, 2, 3];
print(numbers.min); // Output: 1
Implementation
T get min => length == 0
? throw StateError('No element')
: reduce((curr, next) => curr < next ? curr : next);