Question: There are two options to retrieve the scroll position for a CustomScrollView. The [documentation](https://docs.flutter.io/flutter/widgets/CustomScrollView-class.html) states the following: 

> 
> ScrollNotification and NotificationListener, which can be used to watch the scroll position without using a ScrollController.
> 
> 
> 

So we have the following options:

1. NotificationListener with ScrollNotification
2. ScrollController

In which situation do you useNotificationListener with ScrollNotification vs ScrollController?

Thank you :)

Answer: 
If you're using `NestedScrollView` with nested scrollers, using a scrollController on the inner scrollers will break the link with `NestedScrollView` meaning `NestedScrollView` will no longer control the complete scrolling experience. To get information about the scroll positions of the inner scrollers in this case you would use a `NotificationListener` with `ScrollNotification`.

```
NotificationListener<ScrollNotification>(
  child: ListView.builder(
    itemCount: 10
    itemBuilder: (BuildContext context, int index) {
      return Text('Item $index');
    },
  ),
  onNotification: (ScrollNotification scrollInfo) {
    if (scrollInfo.metrics.pixels ==
        scrollInfo.metrics.maxScrollExtent) {
      onLoadMore();
    }
  },
);

```

Related Answer [here](https://stackoverflow.com/a/46853315/2190496).
Although you can use both ScrollNotification and ScrollController to listen scroll position changes, and many times it is not going to be difference, you should keep in mind some details in order to better choose the best tool for the job:

**ScrollController**

* To use a ScrollController you should use a Stateful widget, so that it can be properly dispose.
* Even if you can use the same ScrollController to control several scrollable widgets, some operations, such as reading the scroll offset, require the controller to be used with a single scrollable widget.
* If you want to change the scroll position, you are going to need a ScrollController (jumpTo / animateTo).
* When you listen to a ScrollController, you are listening to [ScrollPosition](https://api.flutter.dev/flutter/widgets/ScrollPosition-class.html) changes, what is not exactly the same as [ScrollNotification](https://api.flutter.dev/flutter/widgets/ScrollNotification-class.html). Using ScrollNotifications you can differentiate among several types of events related to the scrolling action, like scroll start, scroll end, dirección change, etc.

**NotificationListener**

* NotificationListener is just another widget, so yo don't need to create a Stateful widget.
* It listens ScrollNotifications from all scrollable widgets below in the widget tree, as notifications propagate upwards. So it is not constraint to listen only one widget.
* You cannot change the scroll position from a NotificationListener. It is read only.
* You listen to ScrollNotification, and not to changes in a ScrollPosition, so you can recognize easily which king of event has just happened.