Skip to content

Commit 6d008ee

Browse files
committed
upgrade to 1.6.5
1 parent 33880e2 commit 6d008ee

File tree

7 files changed

+18
-20
lines changed

7 files changed

+18
-20
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.6.5
2+
* fix check full page logic.
3+
* fix crash "locking up a deactive widget is unsafe".
4+
15
## 1.6.4
26
* fix error crash by deprecated function removed
37
* add extra ScrollView reference parameter

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img src="https://img.shields.io/pub/v/pull_to_refresh.svg"/>
44
</a>
55
<a href="https://flutter.dev/">
6-
<img src="https://img.shields.io/badge/flutter-%3E%3D%201.2.1-green.svg"/>
6+
<img src="https://img.shields.io/badge/flutter-%3E%3D%202.0.0-green.svg"/>
77
</a>
88
<a href="https://opensource.org/licenses/MIT">
99
<img src="https://img.shields.io/badge/License-MIT-yellow.svg"/>
@@ -35,10 +35,10 @@ add this line to pubspec.yaml
3535
```yaml
3636

3737
dependencies:
38-
# stable version
39-
pull_to_refresh: 1.6.3
40-
# other version
41-
# pull_to_refresh: ^1.6.4
38+
39+
pull_to_refresh: ^1.6.5
40+
# null-safety version
41+
# pull_to_refresh: 1.6.4-nullsafety.0
4242

4343
```
4444

README_CN.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img src="https://img.shields.io/pub/v/pull_to_refresh.svg"/>
44
</a>
55
<a href="https://flutter.dev/">
6-
<img src="https://img.shields.io/badge/flutter-%3E%3D%201.2.1-green.svg"/>
6+
<img src="https://img.shields.io/badge/flutter-%3E%3D%202.0.0-green.svg"/>
77
</a>
88
<a href="https://opensource.org/licenses/MIT">
99
<img src="https://img.shields.io/badge/License-MIT-yellow.svg"/>
@@ -35,10 +35,10 @@
3535
```yaml
3636

3737
dependencies:
38-
# stable version
39-
pull_to_refresh: 1.6.3
40-
# other version
41-
# pull_to_refresh: ^1.6.4
38+
39+
pull_to_refresh: ^1.6.5
40+
# null-safety version
41+
# pull_to_refresh: 1.6.4-nullsafety.0
4242

4343
```
4444

example/lib/main.dart

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class MyApp extends StatelessWidget {
1313
// This widget is the root of your application.
1414
@override
1515
Widget build(BuildContext context) {
16-
1716
return RefreshConfiguration(
1817
footerTriggerDistance: 15,
1918
dragSpeedRatio: 0.91,

lib/src/indicator/material_indicator.dart

+1-4
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ class _MaterialClassicHeaderState
7777
duration: Duration(milliseconds: 500));
7878
_valueAni.addListener(() {
7979
// frequently setState will decline the performance
80-
if (mounted && _position.pixels <= 0)
81-
setState(() {});
80+
if (mounted && _position.pixels <= 0) setState(() {});
8281
});
8382
_positionController =
8483
AnimationController(vsync: this, duration: Duration(milliseconds: 300));
@@ -100,8 +99,6 @@ class _MaterialClassicHeaderState
10099
super.didUpdateWidget(oldWidget);
101100
}
102101

103-
104-
105102
@override
106103
Widget buildContent(BuildContext context, RefreshStatus mode) {
107104
// TODO: implement buildContent

lib/src/internals/indicator_wrap.dart

+2-4
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ abstract class RefreshIndicatorState<T extends RefreshIndicator>
240240

241241
resetValue();
242242

243-
if (mode == RefreshStatus.idle)
244-
refresherState.setCanDrag(true);
243+
if (mode == RefreshStatus.idle) refresherState.setCanDrag(true);
245244
}
246245
if (mode == RefreshStatus.completed || mode == RefreshStatus.failed) {
247246
endRefresh().then((_) {
@@ -305,8 +304,7 @@ abstract class RefreshIndicatorState<T extends RefreshIndicator>
305304
refresherState.setCanDrag(false);
306305
update();
307306
} else if (mode == RefreshStatus.twoLeveling) {
308-
refresherState
309-
.setCanDrag(configuration.enableScrollWhenTwoLevel);
307+
refresherState.setCanDrag(configuration.enableScrollWhenTwoLevel);
310308
}
311309
onModeChange(mode);
312310
}

lib/src/internals/slivers.dart

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

404404
// many sitiuation: 1. reverse 2. not reverse

0 commit comments

Comments
 (0)