of<T extends Listenable> method

T of<T extends Listenable>({
  1. bool listen = false,
})

Retrieves the Listenable object of type T from the nearest InheritedProvider ancestor widget.

If listen is true, this widget will rebuild whenever the Listenable changes. Otherwise, it will only retrieve the current value of the Listenable and not rebuild when it changes.

Implementation

T of<T extends Listenable>({bool listen = false}) => InheritedProvider.of<T>(
      this,
      listen: listen,
    );