showDebugWindow method

void showDebugWindow(
  1. BuildContext context
)

Implementation

void showDebugWindow(BuildContext context) {
  RxNet.I.setCollectLogs(true);
  closeDebugWindow();
  OverlayState? overlayState = Overlay.of(context);
  Size size = MediaQuery.of(context).size;
  _overlayEntry = OverlayEntry(
    builder: (context) => SizedBox(
      width: size.width,
      height: size.height,
      child: Center(
        child: DragBox(
            child: ValueListenableBuilder<Size>(
                valueListenable: RxNet.debugWindow,
                builder: (context, value, child) {
                  return SizedBox(
                    width: value.width,
                    height: value.height,
                    child: const DebugPage(),
                  );
                })),
      ),
    ),
  );
  overlayState.insert(_overlayEntry!);
}