intl_phone_number_input
intl_phone_number_input copied to clipboard
onInputChanged logic
Describe the bug
Hi there,
I've noticed that onInputChanged
is called when setting initialValue
and also when focusing out from the textfield.
Any way of changing or controlling this behaviour? It's very problematic in a project I have.
Thanks!
Package version 0.7.0+2
Flutter version 2.2.3
To Reproduce Steps to reproduce the behavior:
- Wrap
Scaffold
with:
GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Scaffold(...)
)
- Add
initialValue
andonInputChanged
to the textfield. - You can see that
onInputChanged
is called oninitialValue
and when tapping around the screen to dismiss the keyboard (even when giving unique keys to the textfield).
Expected behavior
onInputChanged
should be called only when user typed himself in the textfield, or maybe getting a bool
whether it's a user change or code change.
** Targeted platforms (please complete the following information):**
- OS: Android & iOS