debugSubWidget static method

GetScope? debugSubWidget(
  1. BuildContext context,
  2. ValueListenable<Object?> placeholder
)

If a Substitution was made, returns the GetScope widget that made it.

The result is always null in profile & release mode.

Implementation

static GetScope? debugSubWidget(BuildContext context, ValueListenable<Object?> placeholder) {
  return kDebugMode && GetScope.maybeOf(context, placeholder) != null
      ? context.findAncestorStateOfType<_GetScopeState>()?.widget
      : null;
}