marcglasberg / back_button_interceptor

Flutter Package: May be used to intercept the Android back-button, as an alternative to `WillPopScope`.
BSD 2-Clause "Simplified" License
105 stars 21 forks source link

If a keyboard is open back_button_inceptor doesn't recognize the event #11

Closed thorgexyz closed 2 years ago

thorgexyz commented 3 years ago

First of all, thanks for this package.

Before I implemented the package, the back button closed the whole page when the keyboard was open.

Now I implemented the example code, now the keyboard gets closed when the back button is pressed. If it's pressed once more only then myInterceptor gets called (I am checking this with print statements)

Any idea why this might be the case or how I can change that? Thanks

marcglasberg commented 3 years ago

@ThorgeL When the keyboard is open, the back-button press should close it. That's expected behavior. I don't know how this is possible:

Before I implemented the package, the back button closed the whole page when the keyboard was open.

Are you sure about it? Can you please provide me with some simple runnable code for me to test this behavior? Thanks!