closestState property

StateType get closestState

Gets the closest state based on the current offset.

It's not snapped to the actual state position of the viewport, rather, it changes based on the scroll height when it enters the region of the closest state to anchor.

Implementation

StateType get closestState => _extent.stateMapper.state(_extent.currentState);