Search packages, repositories and app categories

Package detailsv3.0.1

scroll_when_needed

A packages that allows us to only scroll when needed with the correct platform specific behaviour.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
555
Likes
21
Pub points
160

Install package

flutter pub add scroll_when_needed

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that enables scrolling only when necessary, ensuring optimal performance and platform-specific behavior. It intelligently manages scroll operations across Android, iOS, Web, macOS, Windows, and Linux, adapting to each platform's conventions. Ideal for improving user experience in scrollable widgets by preventing unnecessary scrolling actions. The package is lightweight and integrates seamlessly into existing scrollable UIs.

Use cases

  • Optimizing scrollable lists in forms
  • Improving accessibility in dynamic content
  • Enhancing performance in nested scroll views
  • Ensuring consistent behavior across platforms
  • Reducing unintended scroll gestures
  • Streamlining input field navigation

Key features

  • Automatic scroll triggering based on need
  • Platform-aware scroll behavior
  • Lightweight and minimal overhead
  • Support for all major Flutter platforms
  • Seamless integration with existing scrollables
  • Smart handling of focus and scroll alignment

Suitable for

  • Developers building cross-platform apps
  • Teams prioritizing UX consistency
  • Apps with complex scroll interactions
  • Accessibility-focused applications
  • Performance-conscious projects

Considerations

  • May require configuration for edge cases
  • Limited customization for scroll physics
  • Depends on correct widget hierarchy
  • Not intended for full control over scroll logic
  • Best suited for standard scroll scenarios

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

scroll_when_needed

Pub

This packages contains a custom scrollbehavior and scroll physics that can be used to have platform specific scrolling behaviour when there is not enough space in a scrollable widget

How to use this package:

ScrollConfiguration(
    behavior: ScrollWhenNeededBehavior(),
    child: ListView(
        physics: ScrollWhenNeededPhysics(targetPlatform: Theme.of(context).platform),
        children: [
            Container(
                height: 100,
                color: Colors.amber,
            ),
            TextField(),
            Container(
                height: 300,
                color: Colors.amber,
            ),
        ],
    ),
),

Categories

Source repository

Projects using this package

No data available yet.