getReactive<T> static method

ReactiveController<T> getReactive<T>(
  1. BuildContext context, {
  2. bool subscribe = false,
})

Provides a way to access a pre-registered reactive controller instance of type T. If the subscribe option is true, the widget is subscribed and will update on all changes whenever the ReactiveController.setState method is called.

Implementation

static ReactiveController<T> getReactive<T>(BuildContext context,
        {bool subscribe = false}) =>
    getInjectable<T>(context, subscribe: subscribe).stateSingleton;