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.
You do not need to change the view you are currently using, just wrap a
ViewObserveraround the view to achieve the following features.
- Observing child widgets those are being displayed in ScrollView
- Support for scrolling to a specific item in ScrollView
- Quickly implement the chat session page effect
- Support for keeping IM message position when inserting or updating messages, avoiding jitter.
-
PageView -
ListView -
SliverList -
GridView -
SliverGrid - Mixing usage of
SliverPersistentHeader,SliverListandSliverGrid -
NestedScrollView -
ScrollViewbuilt by third-party package.
Add scrollview_observer to your pubspec.yaml file:
dependencies:
scrollview_observer: latest_versionImport scrollview_observer in files that it will be used:
import 'package:scrollview_observer/scrollview_observer.dart';