maybeContainerOf<T extends Object> static method
Retrieves the nearest InternalIocInheritedWidget container of type T, or null if not found.
Implementation
static InternalIocInheritedWidget<T>? maybeContainerOf<T extends Object>(
BuildContext context,
) {
return context
.getElementForInheritedWidgetOfExactType<
InternalIocInheritedWidget<T>
>()
?.widget
as InternalIocInheritedWidget<T>?;
}