intl_phone_number_input icon indicating copy to clipboard operation
intl_phone_number_input copied to clipboard

onInputChanged logic

Open CripyIce opened this issue 3 years ago • 0 comments

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:

  1. WrapScaffold with:
GestureDetector(
      onTap: () => FocusScope.of(context).unfocus(),
      child: Scaffold(...)
)
  1. Add initialValue and onInputChanged to the textfield.
  2. You can see that onInputChanged is called on initialValue 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

CripyIce avatar Aug 24 '21 09:08 CripyIce