of static method

SecureApplicationController? of(
  1. BuildContext context, {
  2. bool listen = true,
})

get the SecureApplicationController of the context Use listen = false if you are outside of a widget builder (example in init state or in a bloc)

Implementation

static SecureApplicationController? of(BuildContext context,
    {bool listen = true}) {
  if (listen) {
    return context
        .dependOnInheritedWidgetOfExactType<SecureApplicationProvider>()!
        .secureData;
  } else {
    var widget = context
        .getElementForInheritedWidgetOfExactType<SecureApplicationProvider>()!
        .widget as SecureApplicationProvider;
    return widget.secureData;
  }
}