isAfter method

ValidatorFn<DateTime> isAfter(
  1. DateTime min, [
  2. String? message
])

A date after validator.

Implementation

ValidatorFn<DateTime> isAfter(DateTime min, [String? message]) {
  return (DateTime? value, BuildContext context) {
    if (value != null && value.isBefore(min)) {
      return message ?? HookFormScope.of(context).dateAfter(min);
    }

    return this.call(value, context);
  };
}