flutter_refresh

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter refresh

flutter_refresh #
A Flutter plugin for refreshing every scrollable view by pulling down-up.
Show cases #

Roadmap #


see:ROADMAP.md


Changelogs #


see:CHANGELOG.md


Quick Start #
Installation #
1 Add

flutter_refresh : ^0.0.1

copied to clipboard
to your pubspec.yaml ,and run
flutter packages get
copied to clipboard
in your project's root directory.
2 Add

import 'package:flutter_refresh/flutter_refresh.dart';

copied to clipboard
and write the code like this:


Future<Null> onFooterRefresh() {
return new Future.delayed(new Duration(seconds: 2), () {
setState(() {
_itemCount += 10;
});
});
}


Future<Null> 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,
));
},
);
}



copied to clipboard


full example see here: main.dart.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.