get<T> static method

T get<T>(
  1. BuildContext context,
  2. dynamic key, [
  3. dynamic defaultValue
])

Implementation

static T get<T>(BuildContext context, key, [defaultValue]) {
  final store =
      InheritedModel.inheritFrom<InheritedStore>(context, aspect: key)!;
  store.setKey(key);
  return store.get(defaultValue);
}