styleByType<T> method

T? styleByType<T>()

Implementation

T? styleByType<T>() {
  for (StyleDelegate delegate in styleDelegates) {
    if (delegate.type == T) {
      var instance = delegate.create(this);
      if (instance is AppSkinAware) {
        instance.appSkin = this;
      }
      return instance;
    }
  }
  return null;
}