goBack method

dynamic goBack()

Implementation

goBack() {
  if (navigatorKey.currentContext != null) {
    if (navigatorKey.currentContext!.canPop()) {
      navigatorKey.currentContext!.pop();
    }
  }
  /*
  if (result != null) {
    // navigatorKey.currentState!.popUntil(ModalRoute.withName(initialRoute));
    // navigatorKey.currentContext!.pop();

  } else {
    navigatorKey.currentContext!.pop();
  }
  */
}