From 002f2c2a97f1c6dd32df04f2d6342bae731bc048 Mon Sep 17 00:00:00 2001 From: Cagatay Ulusoy Date: Fri, 26 Jan 2024 16:54:49 +0200 Subject: [PATCH] fix-page-widgets-not-marked-as-dirty-when-decorator-updates --- lib/src/content/wolt_modal_sheet_animated_switcher.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/src/content/wolt_modal_sheet_animated_switcher.dart b/lib/src/content/wolt_modal_sheet_animated_switcher.dart index e9a18bb1..d96c61c0 100644 --- a/lib/src/content/wolt_modal_sheet_animated_switcher.dart +++ b/lib/src/content/wolt_modal_sheet_animated_switcher.dart @@ -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); } }