statefulemitter 1.0.2 copy "statefulemitter: ^1.0.2" to clipboard
statefulemitter: ^1.0.2 copied to clipboard

Extended EventEmitter that fires "statechange" event when state member is changed. Child classes that inherit from EventEmitter can use the standard event emit, subscribe, unsubscribe, etc., methods o [...]

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add statefulemitter

With Flutter:

 $ flutter pub add statefulemitter

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  statefulemitter: ^1.0.2

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

Import it

Now in your Dart code, you can use:

import 'package:statefulemitter/statefulemitter.dart';
0
likes
110
pub points
2%
popularity

Publisher

unverified uploader

Extended EventEmitter that fires "statechange" event when state member is changed. Child classes that inherit from EventEmitter can use the standard event emit, subscribe, unsubscribe, etc., methods of EventEmitter. This class adds a private _state member and a setState(object) and getState() method as well as getter/setter for the getState/SetState methods. Whenever the state is changed, a 'statechange' event will be emitted with the previous state as argument. This allows the handler to compare old state with new state, if desired. This package was developed as part of a port of Modus Create's IoT platform, RoboDomo from JavaScript to Dart and Flutter. The original can be found at https://github.com/RoboDomo.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

debug, eventify

More

Packages that depend on statefulemitter