maybePop static method
Implementation
static void maybePop(BuildContext context, {bool navigatorPop = true}) async{
bool popSuccess = await Navigator.of(context).maybePop();
if (!popSuccess && navigatorPop == true) {
SystemNavigator.pop();
}
}