ContextExtension extension

List of extensions for BuildContext

on

Methods

inheritFrom<A extends Object, T extends InheritedModel<A>>({A? aspect}) → T

Available on BuildContext, provided by the ContextExtension extension

Inherit specific aspect from InheritedModel.
inhMaybeOf<T extends InheritedWidget>({bool listen = true}) → T?

Available on BuildContext, provided by the ContextExtension extension

Obtain the nearest widget of the given type T, which must be the type of a concrete InheritedWidget subclass, and register this build context with that widget such that when that widget changes (or a new widget of that type is introduced, or the widget goes away), this build context is rebuilt so that it can obtain new values from that widget.
inhOf<T extends InheritedWidget>({bool listen = true}) → T

Available on BuildContext, provided by the ContextExtension extension

Obtain the nearest widget of the given type T, which must be the type of a concrete InheritedWidget subclass, and register this build context with that widget such that when that widget changes (or a new widget of that type is introduced, or the widget goes away), this build context is rebuilt so that it can obtain new values from that widget.
maybeInheritFrom<A extends Object, T extends InheritedModel<A>>({A? aspect}) → T?

Available on BuildContext, provided by the ContextExtension extension

Maybe inherit specific aspect from InheritedModel.