How do I Disable hardware back button

60 views
Skip to first unread message

Michael Tawiah Sowah

unread,
Dec 5, 2017, 2:11:24 AM12/5/17
to Flutter Dev
Hi,
Please How do I Disable hardware back button

Ian Hickson

unread,
Dec 5, 2017, 4:38:35 PM12/5/17
to Michael Tawiah Sowah, Flutter Dev
The easiest way is to use a WidgetsBindingObserver's didPopRoute handler:

On Mon, Dec 4, 2017 at 11:11 PM Michael Tawiah Sowah <michael...@gmail.com> wrote:
Hi,
Please How do I Disable hardware back button

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

--
Ian Hickson

😸

Michael Tawiah Sowah

unread,
Dec 5, 2017, 5:04:05 PM12/5/17
to Flutter Dev
A little demo code here would be greatly appreciated as I am really struggling with this quite a while now, thanks

Ian Hickson

unread,
Dec 5, 2017, 5:11:58 PM12/5/17
to Michael Tawiah Sowah, Flutter Dev
There's some sample code at the class-level docs for WidgetsBindingObserver:
https://docs.flutter.io/flutter/widgets/WidgetsBindingObserver-class.html
Reply all
Reply to author
Forward
0 new messages