avalanche_events 0.10.7

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 39

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();
    
    bestClass.observable(otherBestClass);
    
    /// Just listen self stream
    otherBestClass.on('Event from bestClass', (bool eventData){
        print(eventData); // is true
    });
    
    bestClass.dispatchEvent('Event from bestClass', true);
}

Details

GRASP - wiki

Observer Design Pattern - sourcemaking

Mediator Design Pattern - sourcemaking

AvalancheEvents Change Log

0.10.6

  • Added SubscriptionMixin

0.10.5

  • Update readme
  • Added changelog

1. Depend on it

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


dependencies:
  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 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

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
93 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
57 / 100
Overall score:
Weighted score of the above. [more]
39

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    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.

Dependencies

Package Constraint Resolved Available
Dev dependencies
test ^0.12.15+6