Search packages, repositories and app categories

Package detailsv1.0.1

eventify

A cancellable event emitter which supports context based event driven programming.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
123K
Likes
47
Pub points
150

Install package

flutter pub add eventify

Package Overview

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

Eventify is a cancellable event emitter designed for context-aware, event-driven programming in Dart. It enables efficient communication between components by allowing events to be emitted and listened to with built-in cancellation support, ensuring no memory leaks. Ideal for managing state changes, user interactions, or asynchronous workflows across different parts of an app. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux, making it highly versatile for cross-platform development.

Use cases

  • Real-time notifications
  • State management in complex UIs
  • Decoupling business logic from UI
  • Handling user interactions across screens
  • Managing lifecycle events in widgets
  • Broadcasting messages between services

Key features

  • Cancellable event listeners
  • Context-aware event handling
  • Cross-platform compatibility
  • Lightweight and fast
  • Supports async event processing
  • Clean API for subscription and emission

Suitable for

  • Developers building reactive applications
  • Teams using event-driven architecture
  • Projects requiring clean component decoupling
  • Apps with complex state flows
  • Flutter apps needing reliable event broadcasting
  • Developers avoiding callback hell

Considerations

  • Requires careful management of subscriptions to avoid unintended behavior
  • Not ideal for high-frequency event streams without throttling
  • May introduce overhead in very simple use cases
  • Best suited for medium to large-scale applications
  • Needs understanding of event lifecycle and cancellation patterns

Original README

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

EventEmitter

EventEmitter for dart. This can be used in any application to register for events and get notified once it is fired.


This library provide mechanism to register for event notifications with emitter or publisher and get notified in the event of an event.

One main advantage of the mehanism is that, it support context from where the subscriber is listening. The context could be any additional data the subscriber is interested in.

Another feature this has is the ability to receive sender information, which could be handy if the subscriber wish to know about the publisher.

Example

    void performAddition(){

    }

    EventCallback cb = (ev, cont) {
        if (null != ev) {
          switch (ev.eventName) {
            case "add":
              performAddition();
              break;
          }
        }
      };

    EventEmitter emitter = new EventEmitter();
    Listener listener = emitter.on("add", this , cb);

    emitter.emit("add","keyboard",10);


As shown in the above example, it is easy to register for events and get notified once it is triggered.

Categories

Source repository

Projects using this package