code: public static void loadAsync(final ThemeBundle bundle, final ThemeAsyncCallback callback) {
          GWT.runAsync(new RunAsyncCallback() {
              @Override
              public void onSuccess() {
                  if(bundle != null) {
                      if(elements == null) {
                          elements = new ArrayList<>();
                      } else {
                          unload();
                      }
  
                      // More resources might be loaded in the future.
                      elements.add(StyleInjector.injectStylesheet(bundle.style().getText()));
                      elements.add(StyleInjector.injectStylesheet(bundle.overrides().getText()));
                  }
  
                  if(callback != null) {
                      callback.onSuccess(elements.size());
                  }
              }
              @Override
              public void onFailure(Throwable reason) {
                  if(callback != null) {
                      callback.onFailure(reason);
                  }
              }
          });
      }
docs: Load a provided {@link ThemeBundle} asynchronously.
  
  @param bundle The required theme bundle.
  @param callback The async callback.