android-ultra-pull-to-refresh 简书,Flutter listview 使用“pull_to_refresh”实现刷新、加载效果_2020-07-11...

pull_to_refresh介绍

关于pull_to_refresh的介绍及简单使用可参考 github

快速使用如下:

pubspec.yaml使用pub包配置:

dependencies:

pull_to_refresh: ^1.6.0

app全局默认配置

class MyApp extends StatelessWidget {

// This widget is the root of your application.

@override

Widget build(BuildContext context) {

return RefreshConfiguration(

headerBuilder: () => WaterDropHeader(),

// 配置头部默认下拉刷新视图

footerBuilder: () => ClassicFooter(),

// 配置底部默认上拉加载视图

headerTriggerDistance: 80.0,

// 头部触发刷新的距离

springDescription:

SpringDescription(stiffness: 170, damping: 16, mass: 1.9),

// 自定义弹回动画

maxOverScrollExtent: 100,

//The maximum dragging range of the head. Set this property if a rush out of the view area occurs

maxUnderScrollExtent: 0,

// Maximum draggi

你可能感兴趣的:(简书)