AutoSuggestBox: Call onChanged with proper Reason when clearButton clicked
Is your feature request related to a problem? Please describe. Clicking the 'clearButton' does not call 'onChanged' of the AutoSuggestBox.
onChanged is being called when user edits the field, or when a suggestion has been selected. However, it is not being called when the user clicks the clearButton, which is in fact also a "change".
Describe the solution you'd like
In onPressed of clearButton, run:
widget.onChanged?.call(
'',
TextChangedReason.userInput,
);
Describe alternatives you've considered
I've considered to also request a new TextChangedReason.cleared reason, but I cannot find a reason why a user clearing the field manually, would be different from a user clicking the clearButton.
Additional context Add any other context or screenshots about the feature request here.