Skip to content

Commit 0be096c

Browse files
committed
update to 2.0.0
1 parent 6544819 commit 0be096c

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55

66
### features
77
* migrate null-safety
8-
* add needCallback in requestRefresh and requestLoading for avoiding the callback of onRefresh or onLoading
8+
* add needCallback in requestRefresh and requestLoading for avflutoiding the callback of onRefresh or onLoading
99

1010
### Bug fix
1111
* In NestedScrollView+ClampingScrollPhysics(Android ScrollBehaviour),header can be seen when fling to top.
1212
* unMounted widget used crash error when fast rebuild in requestRefresh
13+
* fix sliverRefreshBody layoutSize instead of -0.001,it will crash error when viewportMainAxis=0
1314

1415
### Other
1516
* Add assert to avoid invalid usage

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ add this line to pubspec.yaml
3434

3535
dependencies:
3636

37-
pull_to_refresh: ^1.6.5
38-
# null-safety version
39-
# pull_to_refresh: 1.6.4-nullsafety.0
37+
pull_to_refresh: ^2.0.0
38+
4039

4140
```
4241

README_CN.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@
3333

3434
dependencies:
3535

36-
pull_to_refresh: ^1.6.5
37-
# null-safety version
38-
# pull_to_refresh: 1.6.4-nullsafety.0
36+
pull_to_refresh: ^2.0.0
37+
3938

4039
```
4140

lib/src/internals/slivers.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class RenderSliverLoading extends RenderSliverSingleBoxAdapter {
395395
sliverP = viewport.childAfter(sliverP!);
396396
}
397397
// consider about footer layoutExtent,it should be subtracted it's height
398-
return totalScrollExtent >= cons.viewportMainAxisExtent;
398+
return totalScrollExtent > cons.viewportMainAxisExtent;
399399
}
400400

401401
// many sitiuation: 1. reverse 2. not reverse
@@ -541,7 +541,7 @@ class RenderSliverRefreshBody extends RenderSliverSingleBoxAdapter {
541541
if (childExtent == 1111111) {
542542
child!.layout(
543543
constraints.asBoxConstraints(
544-
maxExtent: constraints.viewportMainAxisExtent - 0.1),
544+
maxExtent: constraints.viewportMainAxisExtent),
545545
parentUsesSize: true);
546546
}
547547
switch (constraints.axis) {

propertys.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| enablePullUp | 是否允许上拉 | boolean | false | 可选 |
1313
| onRefresh | 进入下拉刷新时的回调 | () => Void | null | 可选 |
1414
| onLoading | 进入上拉加载时的回调 | () => Void | null | 可选 |
15-
| onOffsetChange | 它将在超出边缘范围拖动时回调 | (bool,double) => Void | null | 可选 |
15+
| onOffsetChange(2.0.0 removed) | 它将在超出边缘范围拖动时回调 | (bool,double) => Void | null | 可选 |
1616
| onTwoLevel | 当准备打开二楼时的回调 | () => Void | null | 可选 |
1717

1818

@@ -83,7 +83,7 @@
8383
|---------|--------------------------|:-----:|:-----:|:-----:|
8484
| footerBuilder | 默认尾部指示器全局构造器 | () => ? extends LoadIndicator | null | 可选 |
8585
| hideWhenNotFull | 当ScrollView不满一页时,是否要隐藏底部指示器 | bool | false | 可选 |
86-
| autoLoad | 自动加载更多,假如为false,滑动底部不会触发,但提供点击加载更多的方法 | bool | true | 可选 |
86+
| autoLoad(2.0.0 removed) | 自动加载更多,假如为false,滑动底部不会触发,但提供点击加载更多的方法 | bool | true | 可选 |
8787
| enableLoadingWhenFailed | 是否允许通过手势来触发加载更多当失败的状态 | bool | true| 可选 |
8888
| enableLoadingWhenNodata | 是否允许通过手势来触发加载更多当没有更多数据的状态 | bool | false| 可选 |
8989
| footerTriggerDistance | 距离底部边缘触发加载更多的距离,注意这个属性和header的不同,它可以为负数,负数代表越界 | double | 15.0 | 可选 |

propertys_en.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| enablePullUp | switch of pullupload | boolean | false | optional |
1313
| onRefresh | callback when refreshing | () => Void | null | optional |
1414
| onLoading | callback when loading | () => Void | null | optional |
15-
| onOffsetChange | callBack the Visible range of indicator | (bool,double) => Void | null | optional |
15+
| onOffsetChange(2.0.0 removed) | callBack the Visible range of indicator | (bool,double) => Void | null | optional |
1616
| onTwoLevel | callback when second floor is opening | () => Void | null | 可选 |
1717

1818

@@ -78,7 +78,7 @@ Load more(footer):
7878
|---------|--------------------------|:-----:|:-----:|:-----:|
7979
| footerBuilder | the footer indicator builder | () => ? extends LoadIndicator | null | 可选 |
8080
| hideWhenNotFull | whether to hide footer when scrollview not enough one page | bool | true | 可选 |
81-
| autoLoad | Autoload more, if false, sliding bottom will not trigger, but provide more click loading methods | bool | true | 可选 |
81+
| autoLoad(2.0.0 removed) | Autoload more, if false, sliding bottom will not trigger, but provide more click loading methods | bool | true | 可选 |
8282
| enableLoadingWhenFailed | whether allowed to use gesture pull-up trigger to load more when failed state | bool | true| 可选 |
8383
| enableLoadingWhenNoData | whether allowed to use gesture pull-up trigger to load more when no more data state | bool | false| 可选 |
8484
| maxUnderScrollExtent | max underScroll distance | double | ios:inf,android:0 | 可选 |

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: pull_to_refresh
22
description: a widget provided to the flutter scroll component drop-down refresh and pull up load.
3-
version: 1.6.5
3+
version: 2.0.0
44
homepage: https://github.com/peng8350/flutter_pulltorefresh
55

66
environment:

0 commit comments

Comments
 (0)