streamListen method Null safety

Future<Success> streamListen(
  1. String streamId
)

The streamListen RPC subscribes to a stream in the VM. Once subscribed, the client will begin receiving events from the stream.

If the client is already subscribed to the stream, the 103 (Stream already subscribed) RPC error code is returned.

The streamId parameter may have the following published values:

streamIdevent types provided
VMVMUpdate, VMFlagUpdate
IsolateIsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate,
IsolateReload, ServiceExtensionAdded
DebugPauseStart, PauseExit, PauseBreakpoint, PauseInterrupted,
PauseException, PausePostRequest, Resume, BreakpointAdded,
BreakpointResolved, BreakpointRemoved, BreakpointUpdated, Inspect, None
ProfilerCpuSamples, UserTagChanged
GCGC
ExtensionExtension
TimelineTimelineEvents, TimelineStreamsSubscriptionUpdate
LoggingLogging
ServiceServiceRegistered, ServiceUnregistered
HeapSnapshotHeapSnapshot

Additionally, some embedders provide the Stdout and Stderr streams. These streams allow the client to subscribe to writes to stdout and stderr.

streamIdevent types provided
StdoutWriteEvent
StderrWriteEvent

It is considered a backwards compatible change to add a new type of event to an existing stream. Clients should be written to handle this gracefully, perhaps by warning and ignoring.

See Success.

Implementation

Future<Success> streamListen(String streamId);