checkIsCurrent static method

dynamic checkIsCurrent(
  1. dynamic context,
  2. dynamic back, {
  3. dynamic noBack,
})

Implementation

static checkIsCurrent(context, back, {noBack}) async {
  return await Future(() {
    try {
      if (isReception && ModalRoute.of(context)?.isCurrent == true) {
        return back();
      } else {
        return noBack?.call();
      }
    } catch (e) {
      AppConfig.printLog(e);
    }
  });
}