PullToRefreshController constructor

PullToRefreshController(
  1. {void onRefresh(
      )?,
    1. @Deprecated("Use settings instead") PullToRefreshOptions? options,
    2. PullToRefreshSettings? settings}
    )

    A standard controller that can initiate the refreshing of a scroll view’s contents. This should be used whenever the user can refresh the contents of a WebView via a vertical swipe gesture.

    All the methods should be called only when the WebView has been created or is already running (for example PlatformWebViewCreationParams.onWebViewCreated or PlatformInAppBrowserEvents.onBrowserCreated).

    NOTE for Android: to be able to use the "pull-to-refresh" feature, InAppWebViewSettings.useHybridComposition must be true.

    Officially Supported Platforms/Implementations:

    • Android native WebView
    • iOS

    Implementation

    PullToRefreshController(
        {void Function()? onRefresh,
        @Deprecated("Use settings instead") PullToRefreshOptions? options,
        PullToRefreshSettings? settings})
        : this.fromPlatformCreationParams(
              params: PlatformPullToRefreshControllerCreationParams(
                  onRefresh: onRefresh, options: options, settings: settings));