We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.Flutter版本:1.22.3
2.flutter_easyrefresh版本:2.1.6
3.问题描述: 在EasyRefresh中的onLoad函数中使用await后,上拉加载会出现卡在加载中的状态,footer不消失,使得不能继续使用上拉加载和下拉刷新,多次上拉后可复现。 若使用then,onLoad可能会执行2次。
4.可复现代码 import 'package:flutter/material.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
void main() { runApp(MyApp()); }
class MyApp extends StatelessWidget { @OverRide Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), home: MyHomePage(title: 'Flutter Demo Home Page'), ); } }
class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@OverRide _MyHomePageState createState() => _MyHomePageState(); }
Future onLoad() async { await Future.delayed(Duration(milliseconds: 300)); print('await onLoad'); }
Future onLoadThen() async { Future.delayed(Duration(milliseconds: 300)).then((value) { print('then onLoad'); }); }
Future onRefresh() async { await Future.delayed(Duration(milliseconds: 300)); }
class _MyHomePageState extends State { @OverRide Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: EasyRefresh( child: ListView.builder( itemBuilder: (BuildContext context, int index) { return Text('$index'); }, itemCount: 10, ), onLoad: onLoad, // onLoad: onLoadThen, onRefresh: onRefresh, ), ); } }
The text was updated successfully, but these errors were encountered:
数据为空的时候,并且设置了emptyWidget,上拉必卡住。必现
Sorry, something went wrong.
me too. footer的enableInfiniteLoad设置为false,上拉加载必会卡主无法加载,同时无法下拉刷新,enableInfiniteLoad设为true到底部自动触发加载可解决
v2.1.8已修复
No branches or pull requests
1.Flutter版本:1.22.3
2.flutter_easyrefresh版本:2.1.6
3.问题描述:
在EasyRefresh中的onLoad函数中使用await后,上拉加载会出现卡在加载中的状态,footer不消失,使得不能继续使用上拉加载和下拉刷新,多次上拉后可复现。
若使用then,onLoad可能会执行2次。
4.可复现代码
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@OverRide
_MyHomePageState createState() => _MyHomePageState();
}
Future onLoad() async {
await Future.delayed(Duration(milliseconds: 300));
print('await onLoad');
}
Future onLoadThen() async {
Future.delayed(Duration(milliseconds: 300)).then((value) {
print('then onLoad');
});
}
Future onRefresh() async {
await Future.delayed(Duration(milliseconds: 300));
}
class _MyHomePageState extends State {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: EasyRefresh(
child: ListView.builder(
itemBuilder: (BuildContext context, int index) {
return Text('$index');
},
itemCount: 10,
),
onLoad: onLoad,
// onLoad: onLoadThen,
onRefresh: onRefresh,
),
);
}
}
The text was updated successfully, but these errors were encountered: