● 对啊刷新控件-使用方法 GlobalKey _easyfresh = GlobalKey(); DuiaRefresh( autoControl: false, //是否自动更新状态 key: _easyfresh, //传入控制器 child: ListView.builder( //内容 itemCount: 50, itemBuilder: (context, int) => Container( height: 50, color: Colors.orangeAccent, )), onRefresh: ()=> HeaderRefresh(), );

● 刷新方法回调 Future HeaderRefresh() async { //按照惯例15秒超时 return await Future.delayed(const Duration(seconds: 15), () { do something... }); }

● 手动修改刷新状态 _easyfresh.currentState.callRefreshFinish(); ->刷新完成 or callRefresh(); ->触发刷新

Libraries

behavior
duia_refresh
duia_refresher
duiafooter
duiaheader
refresh_safe_area
scroll_physics