From 6d008ee54b1b863998b7ce5904f0118554d07810 Mon Sep 17 00:00:00 2001 From: peng8350 Date: Sun, 11 Apr 2021 20:01:32 +0800 Subject: [PATCH] upgrade to 1.6.5 --- CHANGELOG.md | 4 ++++ README.md | 10 +++++----- README_CN.md | 10 +++++----- example/lib/main.dart | 1 - lib/src/indicator/material_indicator.dart | 5 +---- lib/src/internals/indicator_wrap.dart | 6 ++---- lib/src/internals/slivers.dart | 2 +- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc42859d..c197a3be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index a708d994..2e543760 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - + @@ -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 ``` diff --git a/README_CN.md b/README_CN.md index 75cb3d37..67a5579a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -3,7 +3,7 @@ - + @@ -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 ``` diff --git a/example/lib/main.dart b/example/lib/main.dart index 0b769d88..648cf626 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -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, diff --git a/lib/src/indicator/material_indicator.dart b/lib/src/indicator/material_indicator.dart index 792fd8a7..b499f374 100644 --- a/lib/src/indicator/material_indicator.dart +++ b/lib/src/indicator/material_indicator.dart @@ -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)); @@ -100,8 +99,6 @@ class _MaterialClassicHeaderState super.didUpdateWidget(oldWidget); } - - @override Widget buildContent(BuildContext context, RefreshStatus mode) { // TODO: implement buildContent diff --git a/lib/src/internals/indicator_wrap.dart b/lib/src/internals/indicator_wrap.dart index 87b82119..6f6fbdf7 100644 --- a/lib/src/internals/indicator_wrap.dart +++ b/lib/src/internals/indicator_wrap.dart @@ -240,8 +240,7 @@ abstract class RefreshIndicatorState resetValue(); - if (mode == RefreshStatus.idle) - refresherState.setCanDrag(true); + if (mode == RefreshStatus.idle) refresherState.setCanDrag(true); } if (mode == RefreshStatus.completed || mode == RefreshStatus.failed) { endRefresh().then((_) { @@ -305,8 +304,7 @@ abstract class RefreshIndicatorState refresherState.setCanDrag(false); update(); } else if (mode == RefreshStatus.twoLeveling) { - refresherState - .setCanDrag(configuration.enableScrollWhenTwoLevel); + refresherState.setCanDrag(configuration.enableScrollWhenTwoLevel); } onModeChange(mode); } diff --git a/lib/src/internals/slivers.dart b/lib/src/internals/slivers.dart index cf7c71ec..9dea5130 100644 --- a/lib/src/internals/slivers.dart +++ b/lib/src/internals/slivers.dart @@ -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