event_taxi 0.0.1

  • README.md
  • Example
  • Installing
  • Versions
  • 88

EventTaxi #

Pattern #

An EventBus follows the publish/subscribe pattern. It allows listeners to subscribe for events and publishers to fire events. This enables objects to interact without requiring to explicitly define listeners and keeping track of them.

Read the full Wikipedia article: EventBus

Event Taxi in Flutter Apps or Angular Web Apps #

The Pattern is especially helpful for decoupling different layer from each other. I have found another nice "EventBus Pattern": EventBus

This package is a EventBus but with a little bit more functionality and comfort. This is EventTaxi :D

Usage #

1. Create an Event Bus #

import 'package:event_taxi/event_taxi.dart';

EventTaxi eventBus = EventTaxiImpl();

Note: The EventTaxi is always a singleton

2. Define Events #

You can simple create new events like this:

import 'package:event_taxi/event_taxi.dart';

class OnUserLoggedInEvent implements Event {
  User user;


class OnLoggedOutEvent implements Event {
  bool success;


3. Register Listeners #

4. Fire Events #

License #

The MIT License (MIT)

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.0.1 #

  • Initial version, created by Tikkr
  • Add EventTaxiImpl Class
  • Add EventTaxi Interface (Abstract class)
  • Add EventController
  • Add readMe
  • Add example images for readMe


import 'package:event_taxi/event_taxi.dart';
import 'package:event_taxi/src/event.dart';

class TextEvent implements Event {

  /// The [Event] class is immutable, that means that all properties must be final
  final int textCounter;


main() {
  // This is a ui page

  // This is another ui page

void iAmAPage(){

  EventTaxi eventBus = EventTaxiImpl();

    // Now you have event

void iAmAnotherPage(){
  EventTaxi eventTaxi = EventTaxiImpl();

  // We send the event through the eventBus

Use this package as a library

1. Depend on it

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

  event_taxi: ^0.0.1

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:event_taxi/event_taxi.dart';
Version Uploaded Documentation Archive
0.1.5 Jan 31, 2019 Go to the documentation of event_taxi 0.1.5 Download event_taxi 0.1.5 archive
0.1.4 Jan 21, 2019 Go to the documentation of event_taxi 0.1.4 Download event_taxi 0.1.4 archive
0.1.3 Jan 19, 2019 Go to the documentation of event_taxi 0.1.3 Download event_taxi 0.1.3 archive
0.1.2 Jan 18, 2019 Go to the documentation of event_taxi 0.1.2 Download event_taxi 0.1.2 archive
0.1.1 Jan 18, 2019 Go to the documentation of event_taxi 0.1.1 Download event_taxi 0.1.1 archive
0.1.0 Jan 18, 2019 Go to the documentation of event_taxi 0.1.0 Download event_taxi 0.1.0 archive
0.0.1 Jan 18, 2019 Go to the documentation of event_taxi 0.0.1 Download event_taxi 0.0.1 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 May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15


Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/src/event_controller.dart. (-0.50 points)

Analysis of lib/src/event_controller.dart reported 1 hint:

line 32 col 3: Avoid return types on setters.

Format lib/event_taxi.dart.

Run dartfmt to format lib/event_taxi.dart.

Format lib/src/event.dart.

Run dartfmt to format lib/src/event.dart.

Format lib/src/event_taxi_base.dart.

Run dartfmt to format lib/src/event_taxi_base.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
meta ^1.1.7 1.1.7
Dev dependencies
test ^1.0.0