Skip to content

Commit

Permalink
Merge pull request #128 from woltapp/fix-current-page-not-updated-whe…
Browse files Browse the repository at this point in the history
…n-widget-is-updated

Fix state update handling: Current page widgets do not receive update if the decorator marks the page as dirty
  • Loading branch information
ulusoyca committed Jan 29, 2024
2 parents 7b46f43 + 002f2c2 commit 81ff778
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 81ff778

Please sign in to comment.