PullToRefreshController class
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 WebView.onWebViewCreated or InAppBrowser.onBrowserCreated).
NOTE for Android: to be able to use the "pull-to-refresh" feature, AndroidInAppWebViewOptions.useHybridComposition must be true
.
Constructors
- PullToRefreshController({PullToRefreshOptions? options, void onRefresh()?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onRefresh → (void Function()?)
-
Event called when a swipe gesture triggers a refresh.
final
- options ↔ PullToRefreshOptions
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
beginRefreshing(
) → Future< void> - Tells the controller that a refresh operation was started programmatically.
-
endRefreshing(
) → Future< void> - Tells the controller that a refresh operation has ended.
-
getDefaultSlingshotDistance(
) → Future< int> - Gets the default distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
-
handleMethod(
MethodCall call) → Future -
initMethodChannel(
dynamic id) → void -
isRefreshing(
) → Future< bool> - Returns whether a refresh operation has been triggered and is in progress.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAttributedTitle(
IOSNSAttributedString attributedTitle) → Future< void> - Sets the styled title text to display in the refresh control.
-
setBackgroundColor(
Color color) → Future< void> - Sets the background color of the refresh control.
-
setColor(
Color color) → Future< void> - Sets the color of the refresh control.
-
setDistanceToTriggerSync(
int distanceToTriggerSync) → Future< void> - Set the distance to trigger a sync in dips.
-
setEnabled(
bool enabled) → Future< void> - Sets whether the pull-to-refresh feature is enabled or not.
-
setSize(
AndroidPullToRefreshSize size) → Future< void> - Sets the size of the refresh indicator. One of AndroidPullToRefreshSize.DEFAULT, or AndroidPullToRefreshSize.LARGE.
-
setSlingshotDistance(
int slingshotDistance) → Future< void> - Sets the distance that the refresh indicator can be pulled beyond its resting position during a swipe gesture.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited