1、PullRefreshBox 的构造函数可以这样写:
PullRefreshBox({Key key, this.child, @required this.onRefresh, PullRefreshIndicator indicator, this.overScrollEffect})
: this.indicator = indicator ?? DefaultPullRefreshIndicator(),
super(key: key);
final PullRefreshCallback onRefresh;
final Widget child;
final TargetPlatform overScrollEffect;
final PullRefreshIndicator indicator;
2、PullRefreshBoxState 和 _AnimatedRotationBoxState 的initState没有 调用 super.initState() ,这是不合适的。
3、PullRefreshBoxState 中的方法返回Future,但是没有return。
1、PullRefreshBox 的构造函数可以这样写:
2、PullRefreshBoxState 和 _AnimatedRotationBoxState 的
initState没有 调用super.initState(),这是不合适的。3、
PullRefreshBoxState中的方法返回Future,但是没有return。