eventable 3.0.3 copy "eventable: ^3.0.3" to clipboard
eventable: ^3.0.3 copied to clipboard

outdatedDart 1 only

simple event system for implementing model->event->view design pattern.

example/eventable_example.dart

/**
 * author: Daniel Robinson  http://github.com/0xor1
 */

library EventableExample;

import 'package:eventable/eventable.dart';

part 'bark_event.dart';
part 'cat.dart';
part 'dog.dart';

/**
 * trivial example just to show basic usage pattern
 */
void main(){

  var dog = new Dog();
  var cat = new Cat();

  cat.listen(dog, BarkEvent, cat.dogBarkHandler);

  dog.bark(9);  // cat not disturbed
  dog.bark(11); // cat runs away

}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

simple event system for implementing model->event->view design pattern.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

More

Packages that depend on eventable