showDebuggerDialog method

void showDebuggerDialog(
  1. BuildContext ctx, {
  2. String? initialRoute,
})

显示主页面

Implementation

void showDebuggerDialog(BuildContext ctx, {String? initialRoute}) {
  //只弹出一个主页面
  if (debuggerRouteObserver.navigator == null) {
    Navigator.push(ctx, TransparentCupertinoPageRoute(builder: (ctx) {
      return Padding(
          padding: EdgeInsets.only(top: _paddingTop),
          child: DebugWindow(
            initialRoute: initialRoute,
          ));
    }));
  } else {
    //隐藏主页面
    hideDebuggerDialog(ctx);
  }
}