registerOnTouched method

  1. @override
void registerOnTouched(
  1. TouchFunction f
)

Set the function to be called when the control is touched.

A control's touched state is most commonly used to determine whether or not to show a validation error (for example, many forms would not want to show a required field as having an error before it's been interacted with).

Idiomatically, the control is considered touched once it has received a blur event. Certain controls, such as a dropdown select, may want to consider the control as touched if the user has opened and then closed the list of options.

See TouchHandler for the default idiomatic implementation.

Implementation

@override
void registerOnTouched(TouchFunction f) {}