configureScrollController method

void configureScrollController(
  1. TBLClassicUnit oldWidget
)

This method will mostly switch which ScrollController the TBLWebView will be working with (The internal one or the parent, external Widget one).

Implementation

void configureScrollController(TBLClassicUnit oldWidget) {
  if (oldWidget.scrollController != widget.scrollController) {
    oldWidget.scrollController.removeListener(
        callScrollListener); //TODO: check what happens if removeListener gets a null here
  }

  // Replace existing scroll listener
  widget.scrollController.removeListener(callScrollListener);
  widget.scrollController.addListener(callScrollListener);
}