Commit 15fdef6 1 parent 3e6b045 commit 15fdef6 Copy full SHA for 15fdef6
File tree 5 files changed +12
-7
lines changed
5 files changed +12
-7
lines changed Original file line number Diff line number Diff line change
1
+ ## V 3.0.4
2
+ > fix: ScrollMetrics.minScrollExtent != 0.0, offset calculation error.
3
+ > feat: Supported [ ScrollView.center] [ #581 ] ( https://github.com/xuelongqy/flutter_easy_refresh/pull/581 ) .
4
+
1
5
## V 3.0.3+1
2
6
> docs: NestedScrollView example.
3
7
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ description: EasyRefresh example.
7
7
# Both the version and the builder number may be overridden in flutter
8
8
# build by specifying --build-name and --build-number, respectively.
9
9
# Read more about versioning at semver.org.
10
- version : 3.0.3+48
10
+ version : 3.0.4+49
11
11
12
12
environment :
13
13
sdk : " >=2.13.0 <3.0.0"
Original file line number Diff line number Diff line change @@ -827,28 +827,30 @@ class HeaderNotifier extends IndicatorNotifier {
827
827
! (clamping && _offset > 0 )) {
828
828
return 0 ;
829
829
}
830
+ // Moving distance
831
+ final move = position.minScrollExtent - value;
830
832
if (clamping) {
831
833
if (value > position.minScrollExtent) {
832
834
// Rollback first minus offset.
833
- return math.max (_offset > 0 ? (- value + _offset) : 0 , 0 );
835
+ return math.max (_offset > 0 ? (move + _offset) : 0 , 0 );
834
836
} else {
835
837
// Overscroll accumulated offset.
836
- final mOffset = - value + _offset;
838
+ final mOffset = move + _offset;
837
839
if (hasSecondary && mOffset > secondaryDimension) {
838
840
// Cannot exceed secondary offset.
839
841
return secondaryDimension;
840
842
}
841
843
return mOffset;
842
844
}
843
845
} else {
844
- return value > position.minScrollExtent ? 0 : - value ;
846
+ return value > position.minScrollExtent ? 0 : move ;
845
847
}
846
848
}
847
849
848
850
/// See [IndicatorNotifier.calculateOffsetWithPixels] .
849
851
@override
850
852
double calculateOffsetWithPixels (ScrollMetrics position, double pixels) =>
851
- math.max (- pixels - position.minScrollExtent, 0.0 );
853
+ math.max (position.minScrollExtent - pixels , 0.0 );
852
854
853
855
/// See [IndicatorNotifier.createBallisticSimulation] .
854
856
@override
Original file line number Diff line number Diff line change @@ -376,7 +376,6 @@ class _ERScrollPhysics extends BouncingScrollPhysics {
376
376
}
377
377
}
378
378
}
379
-
380
379
// Update offset
381
380
_updateIndicatorOffset (position, value, value);
382
381
return bounds;
Original file line number Diff line number Diff line change 1
1
name : easy_refresh
2
2
description : A flutter widget that provides pull-down refresh and pull-up load.
3
- version : 3.0.3+1
3
+ version : 3.0.4
4
4
homepage : https://xuelongqy.github.io/flutter_easy_refresh
5
5
repository : https://github.com/xuelongqy/flutter_easy_refresh
6
6
issue_tracker : https://github.com/xuelongqy/flutter_easy_refresh/issues
You can’t perform that action at this time.
0 commit comments