EventEmitter is deprecated and shouldn't be used
Just use a normal StreamController
final _onNameChangeController = new StreamController<String>.broadcast();@Output()Stream<String> get onNameChange => _onNameChangeController.stream;
.broadcast
is optional. It is required to allow multiple subscribers.
See also https://www.dartlang.org/articles/libraries/broadcast-streams