Closed crazy365966834 closed 5 years ago
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。
initState
super.initState()
PullRefreshBoxState
1、PullRefreshBox 的构造函数可以这样写:
2、PullRefreshBoxState 和 _AnimatedRotationBoxState 的
initState
没有 调用super.initState()
,这是不合适的。 3、PullRefreshBoxState
中的方法返回Future,但是没有return。