zefyr
zefyr copied to clipboard
ToolBar
I would like to dismiss the toolbar from the phone instead of the always using the ToolBar. When i try to dismiss it from the phone, it drops to the bottom. is this expected behavior or something that could be fixed?
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [√] Android Studio (version 3.5) [√] VS Code (version 1.41.1) [√] Connected device (1 available)
• No issues found!

are you speaking of the last button on the toolbar? It is intended to dismiss the keyboard
Yes correct but I would like to dismiss it on phone level. When I hit the back arrow on the phone to get out of the keyboard. The toolbar drops to the bottom of the screen and does not dismiss
On Fri, Jan 17, 2020, 6:32 AM Cedric GESTES [email protected] wrote:
are you speaking of the last button on the toolbar? It is intended to dismiss the keyboard
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/memspace/zefyr/issues/233?email_source=notifications&email_token=AFRASSVGBCU664VDC6PEGK3Q6GQMFA5CNFSM4KH3GFPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHRJNI#issuecomment-575607989, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFRASSR3MAUWI3QMCH7VZC3Q6GQMFANCNFSM4KH3GFPA .
facing same issue, any solution to this?
drop the focus from the editor maybe?
I ran into this problem, and for me, it appeared that the keyboard hiding event was absorbing the back button and I was unable to hide the Zefyr toolbar. I managed to close the toolbar by using didChangeMetrics() and a bool for keyboard open;
bool _keyboardOpen = false;
@override void initState() { super.initState(); WidgetsBinding.instance.addObserver(this); }
@override void dispose() { WidgetsBinding.instance.removeObserver(this); super.dispose(); } @override void didChangeMetrics() { super.didChangeMetrics(); final value = WidgetsBinding.instance.window.viewInsets.bottom; if(value > 0){ _keyboardOpen = true; } if (_keyboardOpen && value == 0) { FocusScope.of(context).unfocus(); _keyboardOpen = false; } }