dragDevices

PointerDeviceKind

touch

PointerDeviceKind

mouse

// etc.

};

// Set ScrollBehavior for an entire application.

MaterialApp

scrollBehavior:

MyCustomScrollBehavior

(),

// ...

);

Setting a custom ScrollBehavior for a specific widget

Code before migration:

final

ScrollController

controller

ScrollController

();

ListView

builder

controller:

controller

itemBuilder:

BuildContext

context

int

index

return

Text

'Item

$index