of<T> static method

Signal<T> of<T>(
  1. BuildContext context, {
  2. bool listen = true,
})
override

Look up a signal by its type

Implementation

static Signal<T> of<T>(BuildContext context, {bool listen = true}) {
  return InheritedSignalProvider.of<SignalProvider<T>>(
    context,
    listen: listen,
  )!
      .instance;
}