Disable overscroll effect on Android when reduce animations setting is enabled #839
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This PR disables overscroll effects on Android whenever the reduce animation setting is on. Previously, we used to set the physics for scrollable lists to use BouncingScrollPhysics to match what happens on iOS. However, as mentioned in #758, that was not an optimal solution to this issue.
As such, I've figured out an alternate method of completely disabling overscroll effects by overriding the default scrollBehaviour when the app initializes.
Note that I had to add in
reduceAnimations
toThemeState
asmain.dart
does not have access toThunderBloc
. This does duplicate the code a bit since this setting is also present inThunderState
. To clean this up, we can removereduceAnimations
inThunderState
and only use the value present inThemeState
(I'll leave this as a TODO for the future PR)@micahmo I've tested this on an emulator, but do try it out on a physical device and see if it works appropriately!
Issue Being Fixed
Issue Number: #758
Screenshots / Recordings
overscroll.webm
Checklist
semanticLabel
s where applicable for accessibility?