https://github.com/mttankkeo/flutter_refresh_indicator
This package provides a refresh indicator widget that is far more flexible and native-like than the default Flutter one, built on top of flutter_appbar.
https://github.com/mttankkeo/flutter_refresh_indicator
flutter flutter-package flutter-ui material-ui pull-to-refresh refresh-indicator
Last synced: about 1 month ago
JSON representation
This package provides a refresh indicator widget that is far more flexible and native-like than the default Flutter one, built on top of flutter_appbar.
- Host: GitHub
- URL: https://github.com/mttankkeo/flutter_refresh_indicator
- Owner: MTtankkeo
- License: mit
- Created: 2025-05-16T13:11:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-11-06T00:25:01.000Z (7 months ago)
- Last Synced: 2025-11-06T02:26:52.214Z (7 months ago)
- Topics: flutter, flutter-package, flutter-ui, material-ui, pull-to-refresh, refresh-indicator
- Language: Dart
- Homepage: https://pub.dev/packages/flutter_refresh_indicator
- Size: 4.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
This package provides a refresh indicator widget that is far more flexible and native-like than the default Flutter one, built on top of [flutter_appbar](https://pub.dev/packages/flutter_appbar).
## Preview
The gif image below may appear distorted and choppy due to compression.


## Usage
The following explains the basic usage of this package.
### When Context
```dart
import 'package:flutter/material.dart' hide RefreshIndicator;
// Other Alias: PullToRefresh and SwipeToRefresh
RefreshIndicator(
onRefresh: ..., // AsyncCallback
child: ...
),
```
### When Android
This widget for ClampingScrollPhysics.
```dart
ClampingRefreshIndicator(
onRefresh: ..., // AsyncCallback
child: ...
),
```
### When IOS
This widget for BouncingScrollPhysics.
```dart
BouncingRefreshIndicator(
onRefresh: ..., // AsyncCallback
child: ...
),
```
### How to define the style globally.
#### Using Material Theme
This is the traditional way to define themes in Flutter.
```dart
MaterialApp(
theme: ThemeData(
progressIndicatorTheme: ProgressIndicatorThemeData(
color: ..., // foregroundColor
refreshBackgroundColor: ... // backgroundColor
)
),
);
```
#### Using PrimaryRefreshIndicator widget
PrimaryRefreshIndicator defines the refresh indicator style for its descendant widgets, similar to how PrimaryScrollController provides a scroll controller to its descendants.
```dart
PrimaryRefreshIndicator(
clampingIndicatorBuilder: (...), // Custom indicator for Clamping
bouncingIndicatorBuilder: (...), // Custom indicator for Bouncing
)
```