This PR addresses animation issues and assertion errors that occur during pagination animation in the WoltModalSheetAnimatedSwitcher component. To address these issues:
Ensured when the animation completes, setState is only called when the widget is still mounted to avoid potential issues if the widget is disposed during the animation.
Wrapped the switcher with AbsorbPointer to prevent crashes caused by interaction that changes page.
Enabled setting the pagination duration animation through the AnimationStyle.
Related Issues
279
Before
After
Custom pagination animation duration:
350 ms
1500 ms
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process.
[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes tests for all changed/updated/fixed behaviors.
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (melos run analyze) does not report any problems on my PR.
[x] The package compiles with the minimum Flutter version stated in the pubspec.yaml
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
Description
This PR addresses animation issues and assertion errors that occur during pagination animation in the
WoltModalSheetAnimatedSwitcher
component. To address these issues:setState
is only called when the widget is still mounted to avoid potential issues if the widget is disposed during the animation.Related Issues
279
Custom pagination animation duration:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?