minOrNull property

num? get minOrNull

Returns the minimum element or null if empty

Implementation

num? get minOrNull => isEmpty ? null : reduce((a, b) => a < b ? a : b);