Pub/sub events with atRecords

In Dart, the AtClient is stored within the AtClientManager. Once an atSign has been onboarded, you will be able to access the AtClientManager for its associated atSign.


AtClientManager is a singleton model. When AtClientManager.getInstance() is called, it will get the AtClientManager instance for the last onboarded atSign.

AtClientManager atClientManager = AtClientManager.getInstance();

If you need simultaneous access to multiple atClients, you need to create a new isolate for each additional atClient, and onboard its atSign within the isolate.

An example of this pattern can be found in at_daemon_server.


As previously mentioned, the AtClientManager stores the actual AtClient itself. You can retrieve the AtClient by calling atClientManager.atClient.

AtClient atClient = atClientManager.atClient;


Before you can do anything with an atRecord, you need an atKey to represent it.

If you don't know how to create an atKey, please see the reference first.

The following examples use the self atKeyphone.wavi@<current atSign>

It is up to the developer to modify the atKey according to their use case.

Last updated

© 2023 Atsign