maxOrNull property
num?
get
maxOrNull
Returns the maximum element or null if empty
Implementation
num? get maxOrNull => isEmpty ? null : reduce((a, b) => a > b ? a : b);
Returns the maximum element or null if empty
num? get maxOrNull => isEmpty ? null : reduce((a, b) => a > b ? a : b);