TinoGuo / pin_input_text_field

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

Correctly remove&add FocusNode listener #73

Closed Albert221 closed 2 years ago

Albert221 commented 2 years ago

The current implementation adds the same listener on each update to the widget when focusNode is null. This change fixes it.

This is exactly what Flutter does in the framework in many places:

https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/text_field.dart#L959-L962