get<T> static method

T get<T>(
  1. BuildContext context, [
  2. bool subscribe = true
])

Provides a way to access a pre-registered reactive instance of type T. context must be provided so the widget is subscribed and will update on all changes whenever the ReactiveController.setState method is called.

Implementation

static T get<T>(BuildContext context, [bool subscribe = true]) =>
    getInjectable<T>(context, subscribe: subscribe).singleton;