chungbd/til

NotificationListener

Opened this issue · 0 comments

NotificationListener is a widget that listens for Notifications budding up the tree of widgets.

  • Some widget dispatch notifications such as Scrollable widgets dispatch ScrollNotification.
  • Can extend Notification to dispatch your own
class MyNotification extends Notification {}

MyNotification.dispatch(context);
NotificationListener(
          onNotification: (ScrollNotification notification) {
            return true;
          },
          child: 
        )