Closed
Description
Use case
While it’s possible to extend FormField
and override FormFieldState.reset()
, there’s no built-in way to respond to a reset when using FormField
directly as a widget. This becomes a problem when creating custom form widgets that need to reset internal state. Unlike onSaved
, there’s no onReset
callback to easily handle this lifecycle event without subclassing.
Proposal
i’d like to add an optional onReset
callback to FormField
, similar to onSaved
, which gets triggered when FormFieldState.reset()
is called.