Skip to content

Commit

Permalink
fix-page-widgets-not-marked-as-dirty-when-decorator-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ulusoyca committed Jan 26, 2024
1 parent 7b46f43 commit 002f2c2
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 002f2c2

Please sign in to comment.