Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix state update handling: Current page widgets do not receive update if the decorator marks the page as dirty #128

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/src/content/wolt_modal_sheet_animated_switcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ class _WoltModalSheetAnimatedSwitcherState
}
if (oldWidget.pageIndex != widget.pageIndex) {
_addPage(animate: true);
} else {
// In this case, the page index didn't change and there is no pagination animation needed,
// but all the widgets inside the page should be marked as dirty to receive the updates. We
// are aware that this is not the most efficient way to handle this problem. There
// is a planned complete internal refactor for performance improvements and address this
// issue.
_incomingPageWidgets = null;
_addPage(animate: false);
}
}

Expand Down