FLUTTER ECOSYSTEM

horizontal_blocked_scroll_physics

A ScrollPhysics class that blocks movement in the horizontal axis.

Latest version
4.0.1
30-day downloads
2.5K
Likes
31
Pub points
160

Package Overview

Selection guidance generated from public package information. For reference only.

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
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add horizontal_blocked_scroll_physics

Categories

Related projects

No data available yet.