get<T> method

T? get<T>()

Gets inherited property of type T.

The initial set of values are populated by WidgetFactory.getDependencies. Parser and builder may use BuildTree.inherit to enqueue more.

Implementation

T? get<T>() {
  if (T == TextStyle) {
    // by default, `get` will return the TextStyle from the original deps list
    // let's intercept here and return the active object instead
    // this also acts as an escape hatch to get the TextStyle directly without preparing
    return _style as T;
  }

  return _get(values);
}