Avalanche events

  • Stream for decouple many objects
  • Simple subscription on object events
  • Work both, on client and server

All you need is stream

Build Status pub package

c9 - editor

library example_library;

import 'dart:async';

import 'package:avalanche_events/avalanche_events.dart';

/// Extend class
class BestClass extends AvalancheEvents {}
/// Or extend Object with mixins
class OtherBestClass extends Object with NotifyMixin, ObservableMixin {}

void main() {
    BestClass bestClass = new BestClass();
    OtherBestClass otherBestClass = new OtherBestClass();
    /// Just listen self stream
    otherBestClass.on('Event from bestClass', (bool eventData){
        print(eventData); // is true
    bestClass.dispatchEvent('Event from bestClass', true);


GRASP - wiki

Observer Design Pattern - sourcemaking

Mediator Design Pattern - sourcemaking