Skip to content

Instantly share code, notes, and snippets.

@berkanaslan
Last active May 28, 2021 07:07
Show Gist options
  • Select an option

  • Save berkanaslan/067f1a907c8d2fe83f3b0729a7742c1f to your computer and use it in GitHub Desktop.

Select an option

Save berkanaslan/067f1a907c8d2fe83f3b0729a7742c1f to your computer and use it in GitHub Desktop.
Future<bool> onWillPop(BuildContext context) async {
final currentNavigatorState = currentScreen.navigatorState.currentState;
if (currentNavigatorState.canPop()) {
currentNavigatorState.pop();
return false;
} else {
if (currentTabIndex != FIRST_SCREEN) {
setTab(FIRST_SCREEN);
notifyListeners();
return false;
} else {
return false;
);
}
}
}
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment