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

Does this work with the material AppBar back button? #2

Closed george-ayris closed 4 years ago

george-ayris commented 4 years ago

Hi there,

These library works wonderfully with the native Android back button, however, I'd also like the same behaviour when pressing the AppBar back button (from the flutter/material.dart package) and by default it doesn't appear to work. Is there a way to enable this behaviour?

Cheers, George

marcglasberg commented 4 years ago

Hello George,

The AppBar is a regular widget which implements its own back function, probably by calling Navigator.pop(context);. I has nothing to do with the Android back-button, and as such is not the concern of the back_button_interceptor package.

So, I'm afraid I can't help you. I suggest you study this info: https://flutter.dev/docs/cookbook/navigation/navigation-basics

george-ayris commented 4 years ago

Thanks for your help.