⏱ 13 mins remaining


Learn how the Flutter SDK works



AtClientPreference is used to configure the preferences of an atPlatform application. It offers a variety of attributes to give a developer ultimate flexibility.

AttributesDescriptionOptional/MandatoryDefault Value
hiveStoragePathLocal device path of hive storageMandatoryN/A
commitLogPathLocal device path of commit logMandatoryN/A
isLocalStoreRequiredSpecify whether local store is requiredOptionalfalse
cramSecretShared secret of the atSignMandatoryN/A
keyStoreSecretSecret key to encrypt keystore dataMandatoryN/A
privateKeyPrivate key of the atSignMandatoryN/A
namespaceSpecifies the namespace of an app.MandatoryN/A
rootDomainDomain of the root server. Defaults to root.atsign.comOptionalroot.atsign.org
rootPortPort of the root server. Defaults to 64Optional64
syncIntervalMinsFrequency of sync tasks to run in minutes. Defaults to 10 minutes.Optional10
outboundConnectionTimeoutIdle time in milliseconds of connection to secondary server. Defaults to 10 minutes.Optional600000
maxDataSizeMaximum data size a secondary can store. Temporary solution. Have to fetch this from the server using stats verb.Optional512000
downloadPathDefault path to download stream filesMandatoryN/A
syncRegexRegex to perform syncMandatoryN/A
syncBatchSizeNumber of keys to batch for sync to secondary serverOptional5
syncPageLimitNumber of keys to pull from cloud secondary to local secondary in a single call.Optional10

For Local device paths we recommend the path_provider package.


Future<AtClientPreference> loadAtClientPreference() async {
 var dir = await getApplicationSupportDirectory();
 return AtClientPreference()
       ..rootDomain = 'root.atsign.org'
       ..namespace = 'sdkExample'
       ..hiveStoragePath = dir.path
       ..commitLogPath = dir.path
       ..isLocalStoreRequired = true
     // TODO set the rest of your AtClientPreference here