https://github.com/yusanlou/bnrefreshindicator
A system based refresh & load component.
https://github.com/yusanlou/bnrefreshindicator
android dart flutter ios loadmore refresh
Last synced: 4 months ago
JSON representation
A system based refresh & load component.
- Host: GitHub
- URL: https://github.com/yusanlou/bnrefreshindicator
- Owner: yusanlou
- License: mit
- Created: 2019-04-19T07:16:20.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-23T03:03:11.000Z (almost 7 years ago)
- Last Synced: 2025-10-22T22:57:51.798Z (6 months ago)
- Topics: android, dart, flutter, ios, loadmore, refresh
- Language: Dart
- Size: 7.92 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bn_refresh_indicator
A system based refresh & load component.
## Feature
- System based, no intrusion.
- Support automatic refresh, manual control refresh.
- Support no data display.
## How To Use It .
It's basically the same as the native RefreshIndicator.
```dart
BnRefreshIndicator(
refreshController: refreshController, // Control refresh action
autoRefresh: false,
nodataWidget: Text('there is no data'),
onRefresh: () async {
await Future.delayed(Duration(seconds: 3));
more = !more;
_counter = 10;
if (mounted) {
setState(() {});
}
return more;
},
onLoadMore: () async {
await Future.delayed(Duration(seconds: 3));
_counter += 10;
if (mounted) {
setState(() {});
}
return false;
},
child: ListView.builder(
// physics: BouncingScrollPhysics,
itemBuilder: (context, index) {
return GestureDetector(
child: Card(
child: Center(
child: Text('index -- $index'),
),
),
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return MyHomePage(title: 'Second page');
}));
},
);
},
itemCount: _counter,
itemExtent: 88.0,
),
)
```
## Reference
![refresh]()
## Extension
It's very low intrusive, and if you don't need to load it just keep refresh, just Set `onLoadMore` to null or not assign it a value.
## Planned
Support for custom refresh animations.