Flutter 3.41 is live! Check out theFlutter 3.41 blog post!
Default multitouch scrolling
ScrollBehaviors will now configure how Scrollables respond to multitouch gestures.
These breaking change docs are accurate, as of the release under which they are published. Over time, the workarounds described here might become inaccurate. We don't, in general, keep these breaking change docs up to date as of each release.
Thebreaking change index file lists the docs created for each release.
Summary
#ScrollBehaviors now allow or disallow scrolling speeds to be affected by the number of pointers on the screen.ScrollBehavior.multitouchDragStrategy, by default, prevents multiple pointers interacting wih the scrollable at the same time from affecting the speed of scrolling.
Context
# Prior to this change, for each pointer dragging aScrollable widget, the scroll speed would increase. This did not match platform expectations when interacting with Flutter applications.
Now, the inheritedScrollBehavior manages how multiple pointers affect scrolling widgets as specified byScrollBehavior.multitouchDragStrategy. This enum,MultitouchDragStrategy, can also be configured for the prior behavior.
Description of change
#This change fixed the unexpected ability to increase scroll speeds by dragging with more than one finger.
If you have relied on the previous behavior in your application, there are several ways to control and configure this feature.
Extend
ScrollBehavior,MaterialScrollBehavior, orCupertinoScrollBehaviorto modify the default behavior, overridingScrollBehavior.multitouchDragStrategy.- With your own
ScrollBehavior, you can apply it app-wide by settingMaterialApp.scrollBehaviororCupertinoApp.scrollBehavior. - Or, if you wish to only apply it to specific widgets, add a
ScrollConfigurationabove the widget in question with your customScrollBehavior.
- With your own
Your scrollable widgets then inherit and reflect this behavior.
- Instead of creating your own
ScrollBehavior, another option for changing the default behavior is to copy the existingScrollBehavior, and set differentmultitouchDragStrategy.- Create a
ScrollConfigurationin your widget tree, and provide a modified copy of the existingScrollBehaviorin the current context usingcopyWith.
- Create a
To accommodate the new configurationDragGestureRecognizer was updated to supportMultitouchDragStrategy as well in other dragging contexts.
Migration guide
#Setting a customScrollBehavior for your application
#Code before migration:
MaterialApp(// ...);Code after migration:
classMyCustomScrollBehaviorextendsMaterialScrollBehavior{// Override behavior methods and getters like multitouchDragStrategy@overrideMultitouchDragStrategygetMultitouchDragStrategy(BuildContextcontext)=>MultitouchDragStrategy.sumAllPointers;}// Set ScrollBehavior for an entire application.MaterialApp(scrollBehavior:MyCustomScrollBehavior(),// ...);Setting a customScrollBehavior for a specific widget
#Code before migration:
finalScrollControllercontroller=ScrollController();ListView.builder(controller:controller,itemBuilder:(BuildContextcontext,intindex){returnText('Item$index');},);Code after migration:
classMyCustomScrollBehaviorextendsMaterialScrollBehavior{// Override behavior methods and getters like multitouchDragStrategy@overrideMultitouchDragStrategygetMultitouchDragStrategy(BuildContextcontext)=>MultitouchDragStrategy.sumAllPointers;}// ScrollBehavior can be set for a specific widget.finalScrollControllercontroller=ScrollController();ScrollConfiguration(behavior:MyCustomScrollBehavior(),child:ListView.builder(controller:controller,itemBuilder:(BuildContextcontext,intindex){returnText('Item$index');},),);Copy and modify existingScrollBehavior
#Code before migration:
finalScrollControllercontroller=ScrollController();ListView.builder(controller:controller,itemBuilder:(BuildContextcontext,intindex){returnText('Item$index');},);Code after migration:
// ScrollBehavior can be copied and adjusted.finalScrollControllercontroller=ScrollController();ScrollConfiguration(behavior:ScrollConfiguration.of(context).copyWith(multitouchDragStrategy:MultitouchDragStrategy.sumAllPointers,),child:ListView.builder(controller:controller,itemBuilder:(BuildContextcontext,intindex){returnText('Item$index');},),);Timeline
# Landed in version: 3.18.0-4.0.pre
In stable release: 3.19.0
References
#API documentation:
ScrollConfigurationScrollBehaviorMaterialScrollBehaviorCupertinoScrollBehaviorMultitouchDragStrategyDragGestureRecognizer
Relevant issue:
Relevant PRs:
Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-10-30.View source orreport an issue.