onValidate property

(Future<String?> Function(String text)?) onValidate
final

The function to be called when the user taps on the primaryAction button to return the value.

If it returns null, validation has gone through and the Future with the value will be returned. Returning a String means validation failed, with said String being the error text.

Implementation

final Future<String?> Function(String text)? onValidate;