onClose method

void onClose()

Implementation

void onClose() {
  // 调用 onDispose
  config.onDispose?.call();
  // 清除本地化翻译 Map
  Get.clearTranslations();
  // 清除 snackBar
  config.snackBarQueue.disposeControllers();
  // 清除所有路由绑定关系
  RouterReportManager.instance.clearRouteKeys();
  // 销毁 [RouterReportManager] 单例
  RouterReportManager.dispose();
  // 清除所有绑定的实例
  Get.resetInstance(clearRouteBindings: true);
  // 将 GetRootState 从全局中移除
  _controller = null;
  // 移除 WidgetsBinding 的监听
  Engine.instance.removeObserver(this);
}