Skip to content

Commit

Permalink
Merge pull request #857 from LinXunFeng/fix_init_isNested
Browse files Browse the repository at this point in the history
fix: supplement the initialization of isNested
  • Loading branch information
xuelongqy authored Aug 18, 2024
2 parents 424b8e2 + f5e53de commit 2a8a08e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/src/easy_refresh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ class _EasyRefreshState extends State<EasyRefresh>
vsync: this,
onRefresh: _onRefresh,
canProcessAfterNoMore: widget.canRefreshAfterNoMore,
isNested: widget.isNested,
triggerAxis: widget.triggerAxis,
waitRefreshResult: _waitRefreshResult,
onCanRefresh: () {
Expand All @@ -422,6 +423,7 @@ class _EasyRefreshState extends State<EasyRefresh>
vsync: this,
onLoad: widget.onLoad,
canProcessAfterNoMore: widget.canLoadAfterNoMore,
isNested: widget.isNested,
triggerAxis: widget.triggerAxis,
waitLoadResult: _waitLoadResult,
onCanLoad: () {
Expand Down
6 changes: 5 additions & 1 deletion lib/src/notifier/indicator_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ abstract class IndicatorNotifier extends ChangeNotifier {
required this.userOffsetNotifier,
required CanProcessCallBack onCanProcess,
required bool canProcessAfterNoMore,
required bool isNested,
Axis? triggerAxis,
bool waitTaskResult = true,
FutureOr Function()? task,
}) : _indicator = indicator,
_onCanProcess = onCanProcess,
_canProcessAfterNoMore = canProcessAfterNoMore,
_isNested = isNested,
_triggerAxis = triggerAxis,
_waitTaskResult = waitTaskResult,
_task = task {
Expand Down Expand Up @@ -148,7 +150,7 @@ abstract class IndicatorNotifier extends ChangeNotifier {
ScrollMetrics get position => _position!;

/// Handling NestedScrollView
bool _isNested = false;
bool _isNested;

bool get isNested => _isNested;

Expand Down Expand Up @@ -955,6 +957,7 @@ class HeaderNotifier extends IndicatorNotifier {
required super.vsync,
required CanProcessCallBack onCanRefresh,
super.canProcessAfterNoMore = false,
super.isNested = false,
bool canProcessAfterFail = true,
super.triggerAxis,
FutureOr Function()? onRefresh,
Expand Down Expand Up @@ -1106,6 +1109,7 @@ class FooterNotifier extends IndicatorNotifier {
required super.vsync,
required CanProcessCallBack onCanLoad,
super.canProcessAfterNoMore = false,
super.isNested = false,
bool canProcessAfterFail = true,
super.triggerAxis,
FutureOr Function()? onLoad,
Expand Down

0 comments on commit 2a8a08e

Please sign in to comment.