effectsBuilder property
This method is responsible for animating the children based on the current scroll position.
It is called once per visible child each time the scroll updates, and is passed the following arguments:
index
: the index of the child in the children listscrollRatio
: the child's scroll position relative to the "center" of the scroll. This is a range between -1 and 1, where:-1
indicates the furthest extent in the "before" direction0
indicates the center; the neutral resting point for the selected item+1
indicates the furthest extent in the "after" direction
child
: the child widget
The method should return a widget that wraps the child, and applies the desired effects based on scrollRatio
.
Note that scrollRatio
may exceed -1 to 1, if the user overscrolls.
See the "Cover Slider" and "Circular Menu" demos in /example/lib/views/
for examples.
Implementation
final EffectsBuilder effectsBuilder;