DartToolingDaemon class
A connection to a Dart Tooling Daemon instance.
The base interactions for Dart Tooling Daemon are found here.
- Available extensions
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
- isClosed → bool
-
Whether or not the connection is closed.
no setter
- 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]
, or with[methodName]
whenserviceName
is null. -
close(
) → Future< void> - Terminates the connection with the Dart Tooling Daemon.
-
getIDEWorkspaceRoots(
) → Future< IDEWorkspaceRoots> -
Available on DartToolingDaemon, provided by the FileSystemService extension
Gets the IDE workspace roots for the FileSystem service. -
getProjectRoots(
{int depth = defaultGetProjectRootsDepth}) → Future< UriList> -
Available on DartToolingDaemon, provided by the FileSystemService extension
Gets the project roots contained within the current set of IDE workspace roots. -
getRegisteredServices(
) → Future< RegisteredServicesResponse> - Returns a structured response with all the currently registered services available on this DTD instance.
-
getVmServices(
) → Future< VmServicesResponse> -
Available on DartToolingDaemon, provided by the ConnectedAppsExtension extension
Returns a response containing information about the set of VM service connections this DTD instance is aware of. -
listDirectoryContents(
Uri uri) → Future< UriList> -
Available on DartToolingDaemon, provided by the FileSystemService extension
Lists the directories and files under the directory aturi
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
. -
onVmServiceUpdate(
) → Stream< DTDEvent> -
Available on DartToolingDaemon, provided by the ConnectedAppsExtension extension
The stream of VM service update events. -
postEvent(
String streamId, String eventKind, Map< String, Object?> eventData) → Future<void> -
Posts a DTDEvent with
eventData
tostreamId
. -
readFileAsString(
Uri uri, {Encoding encoding = utf8}) → Future< FileContent> -
Available on DartToolingDaemon, provided by the FileSystemService extension
Reads the file aturi
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. -
registerVmService(
{required String uri, required String secret, String? exposedUri, String? name}) → Future< Success> -
Available on DartToolingDaemon, provided by the ConnectedAppsExtension extension
Registers a new VM service connection aturi
. -
setIDEWorkspaceRoots(
String secret, List< Uri> roots) → Future<void> -
Available on DartToolingDaemon, provided by the FileSystemService extension
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
-
unregisterVmService(
{required String uri, required String secret}) → Future< Success> -
Available on DartToolingDaemon, provided by the ConnectedAppsExtension extension
Unregisters the VM service connection aturi
, if it exists. -
writeFileAsString(
Uri uri, String contents, {Encoding encoding = utf8}) → Future< void> -
Available on DartToolingDaemon, provided by the FileSystemService extension
Writescontents
to the file aturi
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.