Search packages, repositories and app categories

Package detailsv1.27.3

scrollview_observer

A widget for observing data related to the child widgets being displayed in a ScrollView.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
153K
Likes
325
Pub points
160

Install package

flutter pub add scrollview_observer

Package Overview

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

The scrollview_observer package provides a widget that monitors and reports data about child widgets currently visible within a ScrollView. It enables developers to track which items are on-screen, their positions, and visibility states, facilitating dynamic content loading, analytics, or UI adjustments based on scroll behavior. Ideal for implementing infinite lists, performance optimizations, or real-time feedback in scrollable interfaces.

Use cases

  • Infinite scrolling with lazy loading
  • Tracking visible items for analytics
  • Dynamic UI updates based on scroll position
  • Real-time content rendering optimization
  • Scroll-based animations
  • Performance monitoring in long lists

Key features

  • Real-time visibility detection
  • Position tracking of child widgets
  • Lightweight and efficient
  • Supports all Flutter platforms
  • Simple integration with existing ScrollViews
  • Customizable callback triggers

Suitable for

  • Developers building long or infinite lists
  • Apps requiring scroll-based logic
  • Performance-sensitive applications
  • Analytics-integrated scrollable UIs
  • Interactive scroll-driven experiences

Considerations

  • May impact performance if overused
  • Requires careful handling of callbacks
  • Not suitable for simple static lists
  • Limited to direct ScrollView children
  • Best used with optimized child widgets
  • Potential memory overhead with many observers

Original README

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

Flutter ScrollView Observer

author pub stars

Language: English | 中文

This is a library of widget that can be used to listen for child widgets those are being displayed in the scroll view.

☕ Support me

ko-fi wechat

Chat: Join WeChat group

📖 Article

🔨 Feature

You do not need to change the view you are currently using, just wrap a ViewObserver around the view to achieve the following features.

  • [x] Observing child widgets those are being displayed in ScrollView
  • [x] Support for scrolling to a specific item in ScrollView
  • [x] Quickly implement the chat session page effect
  • [x] Support for keeping IM message position when inserting or updating messages, avoiding jitter.

🎀 Support

  • [x] PageView
  • [x] ListView
  • [x] SliverList
  • [x] GridView
  • [x] SliverGrid
  • [x] Mixing usage of SliverPersistentHeader, SliverList and SliverGrid
  • [x] NestedScrollView
  • [x] ScrollView built by third-party package.

🕹 Preview

📦 Installing

Add scrollview_observer to your pubspec.yaml file:

dependencies:
  scrollview_observer: latest_version

Import scrollview_observer in files that it will be used:

import 'package:scrollview_observer/scrollview_observer.dart';

📚 Wiki

🖨 About Me

Categories

Source repository

Projects using this package