DartToolingDaemon class

A connection to a Dart Tooling Daemon instance.

The base interactions for Dart Tooling Daemon are found here.

Constructors

DartToolingDaemon.fromStreamChannel(StreamChannel<String> streamChannel)
Connects to a Dart Tooling Daemon instance over the provided streamChannel.

Properties

done Future<void>
A Future that completes when the connection with the Dart Tooling Daemon is terminated.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String serviceName, String methodName, {Map<String, Object?>? params}) Future<DTDResponse>
Invokes the service method registered with the name [serviceName].[methodName].
close() Future<void>
Terminates the connection with the Dart Tooling Daemon.
getIDEWorkspaceRoots() Future<IDEWorkspaceRoots>
Gets the IDE workspace roots for the FileSystem service.
getProjectRoots({int depth = defaultGetProjectRootsDepth}) Future<UriList>
Gets the project roots contained within the current set of IDE workspace roots.
listDirectoryContents(Uri uri) Future<UriList>
Lists the directories and files under the directory at uri in the environment where the Dart Tooling Daemon is running.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEvent(String streamId) Stream<DTDEvent>
Returns a broadcast Stream for events received on streamId.
postEvent(String streamId, String eventKind, Map<String, Object?> eventData) Future<void>
Posts a DTDEvent with eventData to streamId.
readFileAsString(Uri uri, {Encoding encoding = utf8}) Future<FileContent>
Reads the file at uri from disk in the environment where the Dart Tooling Daemon is running.
registerService(String service, String method, DTDServiceCallback callback, {Map<String, Object?>? capabilities}) Future<void>
Registers this client as the handler for the service.method service method.
setIDEWorkspaceRoots(String secret, List<Uri> roots) Future<void>
Sets the IDE workspace roots for the FileSystem service.
streamCancel(String streamId) Future<void>
Cancel the subscription to streamId.
streamListen(String streamId) Future<void>
Subscribes this client to events posted on streamId.
toString() String
A string representation of this object.
inherited
writeFileAsString(Uri uri, String contents, {Encoding encoding = utf8}) Future<void>
Writes contents to the file at uri in the environment where the Dart Tooling Daemon is running.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

connect(Uri uri) Future<DartToolingDaemon>
Connects to a Dart Tooling Daemon instance.