Settings class

Global settings for CAMS: logging level, app info, time zone, a user ID, and the file paths used to store data on the phone.

A singleton, accessed as Settings(). Must be initialized with init before use, which SmartPhoneClientManager.configure does.

Supports:

Constructors

Settings()
factory

Properties

appName → String?
The app name as displayed in the OS. CFBundleDisplayName on iOS, application/android:label on Android.
no setter
buildNumber → String?
The build number. CFBundleVersion on iOS, versionCode on Android.
no setter
carpBasePath → Future<String>
The base path for storing all CARP related files on the form
no setter
debugLevel ↔ DebugLevel
The global debug level setting.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
initialized → bool
Has the setting been initialized via calling the init method?
no setter
localApplicationPath → Future<String>
Path to a directory where the application may place data that is user-generated (the app documents directory).
no setter
packageInfo → PackageInfo?
Package information for the app, from the package_info_plus plugin.
no setter
packageName → String?
The package name. PRODUCT_BUNDLE_IDENTIFIER on iOS, package on Android.
no setter
preferences → SharedPreferences?
A simple persistent store for simple data. Note that data is saved in plain format and should hence not be used for sensitive data.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timezone → String
The current time zone of this app.
no setter
userId → Future<String>
A user ID that is:
no setter
version → String?
The package version. CFBundleShortVersionString on iOS, versionName on Android.
no setter

Methods

getCacheBasePath(String studyDeploymentId) → Future<String>
The base path for storing cached data for a deployment. The folder is created if it does not exist.
getDataBasePath(String studyDeploymentId) → Future<String>
The base path for storing data (e.g. data files and media files) for a deployment. The folder is created if it does not exist.
getDeploymentBasePath(String studyDeploymentId) → Future<String>
The base path for storing all deployment related files on the form
init() → Future<void>
Initializes settings. Must be called before using any settings.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CARP_CACHE_FILE_PATH → const String
Folder name for cached data under a deployment folder.
CARP_DATA_FILE_PATH → const String
Folder name for data under a deployment folder.
CARP_DEPLOYMENT_FILE_PATH → const String
Folder name for deployments under carpBasePath.
USER_ID_KEY → const String
The preferences key under which userId is stored.