showDebugWindow method

void showDebugWindow(
  1. BuildContext context
)

Implementation

void showDebugWindow(BuildContext context) {
  LogUtil.debug = true;
  _isCollectLogs = 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: debugWindowSizeNotifier,
          builder: (context, value, child) {
            return SizedBox(
              width: value.width,
              height: value.height,
              child: const DebugPage(),
            );
          }
        )),
      ),
    ),
  );
  overlayState?.insert(_overlayEntry!);
}