offsetFromState method
Gets the snapping offset for the specified state.
state: The index of the state.- Returns: The offset in pixels corresponding to the state.
Implementation
double offsetFromState(int state) =>
snappingPixelOffsets.elementAtOrNull(stateToIndex(state)) ?? 0.0;