future function
Validates that fieldValue
(DateTime) is in the future.
Returns null
if fieldValue
> DateTime.now() else an error message
Implementation
String future(
DateTime fieldValue, {
String message,
}) {
if ((fieldValue == null) || (fieldValue.isAfter(DateTime.now()))) {
return null;
}
return message ?? 'Please enter a value in the future';
}