pushBackHandler method
Registers handler as the current target for Android's hardware back button — e.g. a drilled-in detail screen or a fullscreen viewer — instead of the panel or the host app underneath; call the returned callback once that view is gone.
Implementation
VoidCallback pushBackHandler(VoidCallback handler) {
_backHandlers.add(handler);
return () => _backHandlers.remove(handler);
}