Google is committed to advancing racial equity for Black communities. See how.

Agent class

Agent is a globally available object which simplifies common tasks that agent developers will face. At a high level, it is a wrapper around the agent_context.fidl and agent.fidl interface.


Agent ()

Initializes the shared Agent instance.



The hash code for this object. ...
read-only, inherited


A representation of the runtime type of the object.
read-only, inherited


exposeService<T extends Service>(FutureOr<T> serviceImpl) void

Associate serviceImpl to this Agent and exposes it to the rest of the system so that it can be discovered and connected to. Notice that serviceImpl is of type FutureOr<T>, where T represents the service type, to enable the ability to wait for any asynchronous operations to finish before initializing and exposing the service. ...

exposeServiceProvider<T extends Service>(ServiceProvider<T> serviceProvider, ServiceData<T> serviceData) void

Similar to #exposeService but instead of passing the service implementation directly, pass a provider function that can be invoked asynchronously, when a request is received, to provide the service implementation at run time. ...

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed. ...

toString() String

Returns a string representation of this object.


operator ==(Object other) bool

The equality operator. ...