Main purpose

This package helps you ensuring your services and widgets are always notified and provided with the proper values whenever a change happens in order to avoid unneccessary requests and method calls after an event.

Features

In order to avoid unnecessary method calls just to retrieve the new values, this package resembles the known "ChangeNotifier" with the difference of the new values being passed to the listeners by the notifier.

Usage

You can either use the abse class to extend from it or use it as an mixin. The base class takes an generic type argument and makes sure you are always provided with the changes on any event.

class ChatService extends AdvancedChangeNotifier<String> {
  sendMessage(String text) {
    print("He said: '$text'");
    notifyListeners(value: text);
  }
}

Additional information

This package is exceptionally usefule when using it on widgets or their services and can help reducing redundant or unneccessary code by avoiding to request data again everytime an event happens but passing it over with the listener itsself instead.