StreamEventListener<T> constructor

StreamEventListener<T>(
  1. String? type, {
  2. EventCallback<T>? callback,
  3. bool once = false,
  4. bool protected = false,
  5. EventCallbackAdd<T>? onAdd,
  6. EventCallbackRemove<T>? onRemove,
  7. EventCallbackCall<T>? onCall,
  8. EventCallbackCancel<T>? onCancel,
  9. bool cancelAdded = true,
})

Implementation

StreamEventListener(
  String? type, {
  EventCallback<T>? callback,
  super.once,
  super.protected,
  super.onAdd,
  super.onRemove,
  super.onCall,
  super.onCancel,
  super.cancelAdded,
}) : super(type, callback ?? (T data) {}) {
  appendCallback(
    onRemove: (emitter) => close(),
    onCall: (data) => _controller.add(data),
  );
}