mapbox / mapbox/mapbox-maps-flutter
[Feature request] Add scroll deceleration factor
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Hi there! Currently, GestureSettings exposes scrollDecelerationEnabled to control whether a deceleration animation occurs after a user finishes a scroll/pan gesture. While this flag works as expected on Android to toggle the fling/inertia effect, it has no effect on iOS.
When a user scrolls the map on iOS, the map continues coasting for a significant amount of time before coming to a complete stop. This takes longer than expected compared to native iOS scrolling behaviors, and there is currently no way to disable or fine-tune this deceleration via the Flutter plugin.
It looks like in the native Mapbox iOS SDK, this behavior is managed via GestureOptions.panDecelerationFactor (I could be wrong). It would be a great to have native deceleration tuning in Flutter.
Thank you in advance
https://github.com/user-attachments/assets/cc0fbf68-6612-460a-b361-39f62309bd3b
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Flutter plugin's GestureSettings API and trace how scrollDecelerationEnabled is passed to the iOS implementation. Check whether the native Mapbox iOS SDK's panDecelerationFactor is the relevant entry point, then define the Flutter-facing control and verify that it changes iOS map coasting behavior without regressing Android.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100