Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/best-flutter/flutter_refresh
A Flutter plugin for refreshing every scrollable view by pulling down-up.
https://github.com/best-flutter/flutter_refresh
dart flutter pull-to-refresh
Last synced: 3 months ago
JSON representation
A Flutter plugin for refreshing every scrollable view by pulling down-up.
- Host: GitHub
- URL: https://github.com/best-flutter/flutter_refresh
- Owner: best-flutter
- License: mit
- Created: 2018-05-21T09:58:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T13:08:30.000Z (over 6 years ago)
- Last Synced: 2024-01-23T13:48:48.756Z (about 1 year ago)
- Topics: dart, flutter, pull-to-refresh
- Language: Dart
- Homepage:
- Size: 417 KB
- Stars: 72
- Watchers: 4
- Forks: 12
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_refresh
A Flutter plugin for refreshing every scrollable view by pulling down-up.# Show cases

# Roadmap
>>see:[ROADMAP.md](https://github.com/jzoom/flutter_refresh/blob/master/ROADMAP.md)
# Changelogs
>>see:[CHANGELOG.md](https://github.com/jzoom/flutter_refresh/blob/master/README.md)
# Quick Start
## Installation
1 Add
```bash
flutter_refresh : ^0.0.1
```
to your pubspec.yaml ,and run```bash
flutter packages get
```
in your project's root directory.2 Add
```
import 'package:flutter_refresh/flutter_refresh.dart';
```
and write the code like this:
```
Future onFooterRefresh() {
return new Future.delayed(new Duration(seconds: 2), () {
setState(() {
_itemCount += 10;
});
});
}
Future onHeaderRefresh() {
return new Future.delayed(new Duration(seconds: 2), () {
setState(() {
_itemCount = 10;
});
});
}@override
Widget build(BuildContext context) {
...
return new Refresh(
onFooterRefresh: onFooterRefresh,
onHeaderRefresh: onHeaderRefresh,
childBuilder: (BuildContext context,
{ScrollController controller, ScrollPhysics physics}) {
return new Container(
child: new ListView.builder(
physics: physics,
controller: controller,
itemBuilder: _itemBuilder,
itemCount: _itemCount,
));
},
);
}```
>> full example see here: [main.dart](https://github.com/jzoom/flutter_refresh/blob/master/example/lib/main.dart).