);

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

);

);

Code after migration:

// MaterialApps previously had a private ScrollBehavior.

// This is available to extend now.

class

MyCustomScrollBehavior

extends

MaterialScrollBehavior

// Override behavior methods like buildOverscrollIndicator and buildScrollbar