Skip to content

Commit

Permalink
upgrade to 1.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
peng8350 committed Apr 11, 2021
1 parent 33880e2 commit 6d008ee
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.6.5
* fix check full page logic.
* fix crash "locking up a deactive widget is unsafe".

## 1.6.4
* fix error crash by deprecated function removed
* add extra ScrollView reference parameter
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://img.shields.io/pub/v/pull_to_refresh.svg"/>
</a>
<a href="https://flutter.dev/">
<img src="https://img.shields.io/badge/flutter-%3E%3D%201.2.1-green.svg"/>
<img src="https://img.shields.io/badge/flutter-%3E%3D%202.0.0-green.svg"/>
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg"/>
Expand Down Expand Up @@ -35,10 +35,10 @@ add this line to pubspec.yaml
```yaml

dependencies:
# stable version
pull_to_refresh: 1.6.3
# other version
# pull_to_refresh: ^1.6.4

pull_to_refresh: ^1.6.5
# null-safety version
# pull_to_refresh: 1.6.4-nullsafety.0

```

Expand Down
10 changes: 5 additions & 5 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://img.shields.io/pub/v/pull_to_refresh.svg"/>
</a>
<a href="https://flutter.dev/">
<img src="https://img.shields.io/badge/flutter-%3E%3D%201.2.1-green.svg"/>
<img src="https://img.shields.io/badge/flutter-%3E%3D%202.0.0-green.svg"/>
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg"/>
Expand Down Expand Up @@ -35,10 +35,10 @@
```yaml

dependencies:
# stable version
pull_to_refresh: 1.6.3
# other version
# pull_to_refresh: ^1.6.4

pull_to_refresh: ^1.6.5
# null-safety version
# pull_to_refresh: 1.6.4-nullsafety.0

```

Expand Down
1 change: 0 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {

return RefreshConfiguration(
footerTriggerDistance: 15,
dragSpeedRatio: 0.91,
Expand Down
5 changes: 1 addition & 4 deletions lib/src/indicator/material_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ class _MaterialClassicHeaderState
duration: Duration(milliseconds: 500));
_valueAni.addListener(() {
// frequently setState will decline the performance
if (mounted && _position.pixels <= 0)
setState(() {});
if (mounted && _position.pixels <= 0) setState(() {});
});
_positionController =
AnimationController(vsync: this, duration: Duration(milliseconds: 300));
Expand All @@ -100,8 +99,6 @@ class _MaterialClassicHeaderState
super.didUpdateWidget(oldWidget);
}



@override
Widget buildContent(BuildContext context, RefreshStatus mode) {
// TODO: implement buildContent
Expand Down
6 changes: 2 additions & 4 deletions lib/src/internals/indicator_wrap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ abstract class RefreshIndicatorState<T extends RefreshIndicator>

resetValue();

if (mode == RefreshStatus.idle)
refresherState.setCanDrag(true);
if (mode == RefreshStatus.idle) refresherState.setCanDrag(true);
}
if (mode == RefreshStatus.completed || mode == RefreshStatus.failed) {
endRefresh().then((_) {
Expand Down Expand Up @@ -305,8 +304,7 @@ abstract class RefreshIndicatorState<T extends RefreshIndicator>
refresherState.setCanDrag(false);
update();
} else if (mode == RefreshStatus.twoLeveling) {
refresherState
.setCanDrag(configuration.enableScrollWhenTwoLevel);
refresherState.setCanDrag(configuration.enableScrollWhenTwoLevel);
}
onModeChange(mode);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/internals/slivers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class RenderSliverLoading extends RenderSliverSingleBoxAdapter {
sliverP = viewport.childAfter(sliverP);
}
// consider about footer layoutExtent,it should be subtracted it's height
return totalScrollExtent >= cons.viewportMainAxisExtent ;
return totalScrollExtent >= cons.viewportMainAxisExtent;
}

// many sitiuation: 1. reverse 2. not reverse
Expand Down

0 comments on commit 6d008ee

Please sign in to comment.