inheritWidget<T extends InheritedWidget> static method

bool inheritWidget<T extends InheritedWidget>(
  1. BuildContext context, {
  2. Object? aspect,
})

Link a widget to an InheritedWidget of type T

Implementation

static bool inheritWidget<T extends InheritedWidget>(BuildContext context,
        {Object? aspect}) =>
    context.dependOnInheritedWidgetOfExactType<T>(aspect: aspect) != null;