TinoGuo / pin_input_text_field

A textField widget to help display different style pin
Apache License 2.0
374 stars 81 forks source link

Initial value not displayed on first build #15

Closed daniel-v closed 4 years ago

daniel-v commented 4 years ago

Sample:

final _controller = TextEditingController(text:'654');
PinInputTextFormField(
  pinLength: 6,
  controller: _controller,
);

When PinInputTextFormField is built the first time, 654 won't show up. Upon focus, it does. This occurs both with controller and initialValue properties. I believe the cause of the probalem is that _text is set to null when the first build runs.

TinoGuo commented 4 years ago

Thank you for your feedback. I merged your code and published the new version 2.0.2

daniel-v commented 4 years ago

Thanks!