isDevToolsOpen static method

bool isDevToolsOpen()

Check if DevTools is open (basic detection)

Implementation

static bool isDevToolsOpen() {
  try {
    const threshold = 160;
    final widthThreshold =
        web.window.outerWidth - web.window.innerWidth > threshold;
    final heightThreshold =
        web.window.outerHeight - web.window.innerHeight > threshold;
    return widthThreshold || heightThreshold;
  } catch (_) {
    return false;
  }
}