avalanche_events 0.10.7

  • README.md
  • Installing
  • Versions
  • 17

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

AvalancheEvents Change Log


  • Added SubscriptionMixin


  • Update readme
  • Added changelog

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  avalanche_events: ^0.10.7

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:avalanche_events/avalanche_events.dart';
Version Uploaded Documentation Archive
0.10.7 Aug 29, 2016 Go to the documentation of avalanche_events 0.10.7 Download avalanche_events 0.10.7 archive
0.10.6 Aug 17, 2016 Go to the documentation of avalanche_events 0.10.6 Download avalanche_events 0.10.6 archive
0.10.5 Aug 15, 2016 Go to the documentation of avalanche_events 0.10.5 Download avalanche_events 0.10.5 archive
0.10.4 Aug 15, 2016 Go to the documentation of avalanche_events 0.10.4 Download avalanche_events 0.10.4 archive
0.10.3 Aug 15, 2016 Go to the documentation of avalanche_events 0.10.3 Download avalanche_events 0.10.3 archive
0.10.2 Aug 15, 2016 Go to the documentation of avalanche_events 0.10.2 Download avalanche_events 0.10.2 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:avalanche_events/avalanche_events.dart.

Health issues and suggestions

Fix lib/src/notify_mixin.dart. (-43.75 points)

Analysis of lib/src/notify_mixin.dart failed with 2 errors:

line 68 col 32: The argument type '(NotifyMixin) → Future<Null>' can't be assigned to the parameter type '(dynamic) → void'.

line 95 col 24: The argument type '(Map<dynamic, dynamic>) → Future<Null>' can't be assigned to the parameter type '(dynamic) → void'.

Maintenance issues and suggestions

Package is too old. (-100 points)

The package was released more than two years ago.

Add SDK constraint in pubspec.yaml. (-5 points)

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use avalanche_events.dart.


Package Constraint Resolved Available
Dev dependencies
test ^0.12.15+6