-1

Dialog / Bottomsheet Flutter Web not popping when trigger by device back trigger / manual back by keyboard at desktop

it should popping dialog / bottomsheet first before page, but the condition its popping page, and nothing happen with dialog / bottomsheet

1
  • Please provide enough code so others can better understand or reproduce the problem.
    – Community Bot
    Commented Jul 11 at 20:39

1 Answer 1

0

You can use WillPopScope widget and you can control the back key action

return WillPopScope(
  onWillPop: () => _backPressed(_yourKey),
  child: Scaffold(
    body: Page(),
    bottomNavigationBar: CustomNavigationBar(navBarOnTapCallback),
  ),
);

_backPressed in this function you can trigger the navigator pop

Not the answer you're looking for? Browse other questions tagged or ask your own question.