This repo contains an Emitter Dart library that can be used in Flutter.
To use it simply add emitter.dart file into your project.
The library uses Dart mqtt_client library so you have to add it to your dependencies in pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
mqtt_client: ^5.5.2
You can find sample usage in the "emitter_sample_usage.dart" file.