greaterThan static method

Validator greaterThan(
  1. double val, [
  2. String? text
])

Implementation

static Validator greaterThan(double val, [String? text]) {
  return (String? value) {
    if (value == null || value.isEmpty) {
      return "Field cannot be empty.";
    }
    return (double.parse(value.replaceAll(',', '')) < val)
        ? (text ?? "The value should be at least ${val.formatAmount}")
        : null;
  };
}