AtClient class Null safety

Interface for a client application that can communicate with a secondary server.

Implementers

Constructors

AtClient()

Properties

encryptionService → EncryptionService?
read-only
hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

delete(AtKey key, {bool isDedicated = false}) Future<bool>
Delete the key from user's local secondary and syncs the delete to cloud secondary if client's sync preference is immediate. By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice translates to phone.persona@alice where 'persona' is the namespace. If you want to ignoring the namespace set AtKey.metadata.namespaceAware to false. isDedicated need to be set to true to create a dedicated connection
downloadFile(String transferId, String sharedByAtSign, {String? downloadPath}) Future<List<File>>
Downloads the list of files for a given transferId shared by sharedByAtSign Optionally you can pass downloadPath to download the files.
@Deprecated('Method will be removed from SDK since method is moved to app layer')
get(AtKey key, {bool isDedicated = false, GetRequestOptions? getRequestOptions}) Future<AtValue>
Get the value of AtKey.key from user's cloud secondary if AtKey.sharedBy is set. Otherwise looks up the key from local secondary. If the key was stored with public access, set AtKey.metadata.isPublic to true. If the key was shared with another atSign set AtKey.sharedWith
getAtKeys({String? regex, String? sharedBy, String? sharedWith}) Future<List<AtKey>>
Get all the keys stored in user's secondary in AtKey format. If regex is specified only matching keys are returned. If sharedBy is specified, then gets the keys from sharedBy user shared with current atClient user. If sharedWith is specified, then gets the keys shared to sharedWith user from the current atClient user.
getCurrentAtSign() String?
getKeys({String? regex, String? sharedBy, String? sharedWith, bool showHiddenKeys = false}) Future<List<String>>
Get all the keys stored in user's secondary in string format. If regex is specified only matching keys are returned. If sharedBy is specified, then gets the keys from sharedBy user shared with current atClient user. If sharedWith is specified, then gets the keys shared to sharedWith user from the current atClient user.
getLocalSecondary() LocalSecondary?
getMeta(AtKey key) Future<Metadata?>
Gets the metadata of AtKey.key
getPreferences() AtClientPreference?
getRemoteSecondary() RemoteSecondary?
Returns a singleton instance of RemoteSecondary to communicate with user's secondary server.
getSyncManager() → SyncManager?
Returns a singleton instance of SyncManager that is responsible for syncing data between local secondary server and remote secondary server. Deprecated Use AtClientManager.syncService
@Deprecated("Use SyncManager.sync")
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
notify(AtKey key, String value, OperationEnum operation, {MessageTypeEnum? messageType, PriorityEnum? priority, StrategyEnum? strategy, int? latestN, String? notifier, bool isDedicated = false}) Future<bool>
Notifies the AtKey with the sharedWith user of the atsign. Optionally, operation, value and metadata can be set along with key to notify. isDedicated need to be set to true to create a dedicated connection
@Deprecated("Use NotificationService")
notifyAll(AtKey atKey, String value, OperationEnum operation) Future<String>
Notifies the AtKey with the list of sharedWith user's of the atsign. Optionally, operation, value and metadata can be set along with the key to notify.
@Deprecated('Use NotificationService')
notifyChange(NotificationParams notificationParams) Future<String?>
Notifies the NotificationParams.atKey to notificationParams.atKey.sharedWith user of the atSign. Optionally, operation, value and metadata can be set along with key to notify.
notifyList({String? fromDate, String? toDate, String? regex}) Future<String>
Returns the list of received notifications of an atsign, Optionally, notifications can be filtered on from date, to date and regular expression
notifyStatus(String notificationId) Future<String>
Returns the status of the notification
put(AtKey key, dynamic value, {bool isDedicated = false}) Future<bool>
Updates value of AtKey.key is if it is already present. Otherwise creates a new key. Set AtKey.sharedWith if the key has to be shared with another atSign. Set AtKey.metadata.isBinary if you are updating binary value e.g image,file. By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice will be saved as phone.persona@alice where 'persona' is the namespace. If you want to save by ignoring the namespace set AtKey.metadata.namespaceAware to false. Additional metadata can be set using AtKey.metadata isDedicated need to be set to true to create a dedicated connection
putBinary(AtKey atKey, List<int> value) Future<AtResponse>
Used to store the binary data into the keystore. For example: images, files etc.
putMeta(AtKey key) Future<bool>
Updates the metadata of AtKey.key if it is already present. Otherwise creates a new key without a value. By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice will be saved as phone.persona@alice where 'persona' is the namespace. If you want to save by ignoring the namespace set AtKey.metadata.namespaceAware to false.
putText(AtKey atKey, String value) Future<AtResponse>
Used to store the textual data into the keystore. Updates value of AtKey.key is if it is already present. Otherwise creates a new key. Set AtKey.sharedWith if the key has to be shared with another atSign. By default namespace that is used to create the AtClient instance will be appended to the key. phone@alice will be saved as phone.persona@alice where 'persona' is the namespace.
reuploadFiles(List<File> files, FileTransferObject fileTransferObject) Future<List<FileStatus>>
re uploads file in fileTransferObject.fileUrl returns list of FileStatus which contains upload status of each file.
@Deprecated('Method will be removed from SDK since method is moved to app layer')
sendStreamAck(String streamId, String fileName, int fileLength, String senderAtSign, Function streamCompletionCallBack, Function streamReceiveCallBack) Future<void>
Sends stream acknowledgement
setPreferences(AtClientPreference preference) → void
Sets the preferences such as sync strategy, storage path etc., for the client.
shareFiles(List<String> sharedWithAtSigns, String key, String fileUrl, String encryptionKey, List<FileStatus> fileStatus, {DateTime? date}) Future<Map<String, FileTransferObject>>
re sends file notifications to sharedWithAtSigns returns Map<String, FileTransferObject> which contains transfer status for each atsign.
@Deprecated('Method will be removed from SDK since method is moved to app layer')
startMonitor(String privateKey, Function acceptStream, {String? regex}) Future<void>
Creates a monitor connection to atSign's cloud secondary server.Whenever a notification is created on the server, monitor receives the notification on the client. Optionally a regular expression and be passed to filter the notifications deprecated Use NotificationService.subscribe
@Deprecated("Use Monitor Service")
stream(String sharedWith, String filePath, {String namespace}) Future<AtStreamResponse>
Streams the file in filePath to sharedWith atSign.
toString() String
A string representation of this object.
inherited
uploadFile(List<File> files, List<String> sharedWithAtSigns) Future<Map<String, FileTransferObject>>
Uploads list of files to filebin and shares the file download url with sharedWithAtSigns returns map containing key of each sharedWithAtSign and value of FileTransferObject
@Deprecated('Method will be removed from SDK since method is moved to app layer')

Operators

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