v1.1.2swipe_refresh
一组小部件通过下拉手势提供刷新功能。
由 Surf 制作 🏄
以下为英文项目原文快照,最新内容请访问 GitHub。
Widget for refresh by swipe.

Main classes:
Refresh indicator widget with Material Design style.
SwipeRefresh.material(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: const EdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Refresh indicator widget with Cupertino Design style.
SwipeRefresh.cupertino(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: const EdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Refresh indicator widget with adaptive to platform style.
SwipeRefresh.adaptive(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: const EdgeInsets.symmetric(vertical: 10),
children: <Widget>[ ... ],
);
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Refresh indicator widget with adaptive to platform style, and with SliverChildBuilderDelegate in childDelegate(so as not to create more child elements than are visible through Viewport).
SwipeRefresh.builder(
stateStream: Stream<SwipeRefreshState>(),
onRefresh: _refresh,
padding: const EdgeInsets.symmetric(vertical: 10),
itemCount: Colors.primaries.length,
itemBuilder: (context, index) {
return Container(
...
);
},
),
Future<void> _refresh() async {
// When all needed is done change state.
_controller.sink.add(SwipeRefreshState.hidden);
}
Add swipe_refresh to your pubspec.yaml file:
dependencies:
swipe_refresh: $currentVersion$
At this moment, the current version of swipe_refresh is .
All notable changes to this project will be documented in this file.
To report your issues, submit them directly in the Issues section.
If you would like to contribute to the package (e.g. by improving the documentation, fixing a bug or adding a cool new feature), please read our contribution guide first and send us your pull request.
Your PRs are always welcome.
Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.
依赖清单 4 项
{"sdk":"flutter"}{"sdk":"flutter"}^0.2.0^2.0.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗