maxValue static method

String Function(double?) maxValue(
  1. double max, [
  2. String? message
])

Implementation

static String Function(double?) maxValue(double max, [String? message]) {
  return (double? value) => (value ?? double.infinity) > max ? message ?? 'Value must be at most $max' : '';
}