unavailableReason property

  1. @override
PatchbayInspectUnavailableWire? get unavailableReason
override

null when the on-device inspector can actually be shown.

Only the build-mode reasons come from here (PatchbayInspectUnavailableWire.notDebugBuild, PatchbayInspectUnavailableWire.rootInspectorExcluded). PatchbayInspectUnavailableWire.hostDisposed is a bridge-lifecycle fact the bridge answers on its own; a surface never reports it.

Implementation

@override
PatchbayInspectUnavailableWire? get unavailableReason {
  if (!kDebugMode) return PatchbayInspectUnavailableWire.notDebugBuild;
  if (WidgetsBinding.instance.debugExcludeRootWidgetInspector) {
    return PatchbayInspectUnavailableWire.rootInspectorExcluded;
  }
  return null;
}