I have a TextField that has a controller that has a listener for changes. Like this:
final TextEditingController _oneController = TextEditingController();
@override
void initState() {
super.initState();
_oneController.addListener(_listener);
}
TextField(
controller: _oneController,
),
Where _listener is a function that will dispatch an event that my form has been edited.
This works fine, but whenever you focus on the TextField it triggers this listener to run, even if no changes were made to the text in the field.
Is there a way to stop my listener from being called when the TextField enters focus? I don't want my listener to be called when there are no changes made to the text in my TextField.