Overview
A ScrollPhysics implementation that prevents horizontal scrolling, ensuring content only scrolls vertically. Ideal for layouts where horizontal movement could disrupt user experience, such as forms or single-column interfaces. It extends Flutter's base ScrollPhysics and integrates seamlessly into ListView, Scrollable, or other scrollable widgets. The package is lightweight and compatible across all major platforms, including mobile, web, and desktop. Designed for developers seeking fine-grained control over scroll behavior without custom physics logic.
Use cases
- Vertical-only scrolling in forms
- Preventing accidental horizontal swipes
- Single-column content layouts
- Improving accessibility in scrollable UIs
- Ensuring consistent navigation flow
Key features
- Blocks horizontal scroll gestures
- Extends Flutter's ScrollPhysics
- Cross-platform compatibility
- Minimal performance overhead
- Easy integration with existing scrollables
- No external dependencies
Suitable for
- Developers needing strict vertical scrolling
- UI designers focusing on gesture consistency
- Apps with sensitive form inputs
- Accessibility-focused applications
- Simple, predictable scroll behaviors
Considerations
- Not suitable for horizontally scrollable content
- May conflict with nested scroll views
- Requires careful handling in complex layouts
- Limited to blocking horizontal movement only
- Does not affect vertical scroll behavior