avalanche_events 0.10.7

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 36

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 failed Download avalanche_events 0.10.5 archive
0.10.4 Aug 15, 2016 failed Download avalanche_events 0.10.4 archive
0.10.3 Aug 15, 2016 failed Download avalanche_events 0.10.3 archive
0.10.2 Aug 15, 2016 failed Download avalanche_events 0.10.2 archive

Analysis

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

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

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]
39 / 100
Overall score:
Weighted score of the above. [more]
36
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 warnings.

    Strong-mode analysis of lib/src/notify_mixin.dart gave the following warning:

    line: 68 col: 32
    A function of type '(NotifyMixin) → Future<Null>' can't be assigned to a location of type '(dynamic) → void'.

  • 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