I have an interface with two buttons that pop and return true or false, like so:
onPressed: () => Navigator.pop(context, false)
I need t
While you can override the back button for custom behaviors, don't.
Instead of overriding the button with a custom pop, you should handle the null scenario. There are a few reasons why you don't want to manually override the icon:
arrow_back_ios while android uses arrow_backnull. Instead should do the following:
var result = await Navigator.pushNamed(context, "/");
if (result == null) {
result = false;
}