Environment class

Provides access to environment variables.

See: https://developer.android.com/reference/android/os/Environment

Constructors

Environment()

Properties

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

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

Static Properties

dataDirectory → Future<Directory>
Return the user data directory. [...]
read-only
downloadCacheDirectory → Future<Directory>
Return the download/cache content directory. [...]
read-only
externalStorageDirectory → Future<Directory>
Return the primary shared/external storage directory. [...]
read-only
externalStorageState → Future<String>
Returns the current state of the primary shared/external storage media. [...]
read-only
isExternalStorageEmulated → Future<bool>
Returns whether the primary shared/external storage media is emulated. [...]
read-only
isExternalStorageRemovable → Future<bool>
Returns whether the primary shared/external storage media is physically removable. [...]
read-only
rootDirectory → Future<Directory>
Return root of the "system" partition holding the core Android OS. Always present and mounted read-only. [...]
read-only

Constants

DIRECTORY_ALARMS → const String
Standard directory in which to place any audio files that should be in the list of alarms that the user can select (not as regular music). [...]
'Alarms'
DIRECTORY_DCIM → const String
The traditional location for pictures and videos when mounting the device as a camera. [...]
'DCIM'
DIRECTORY_DOCUMENTS → const String
Standard directory in which to place documents that have been created by the user. [...]
'Documents'
DIRECTORY_DOWNLOADS → const String
Standard directory in which to place files that have been downloaded by the user. [...]
'Download'
DIRECTORY_MOVIES → const String
Standard directory in which to place movies that are available to the user. [...]
'Movies'
DIRECTORY_MUSIC → const String
Standard directory in which to place any audio files that should be in the regular list of music for the user. [...]
'Music'
DIRECTORY_NOTIFICATIONS → const String
Standard directory in which to place any audio files that should be in the list of notifications that the user can select (not as regular music). [...]
'Notifications'
DIRECTORY_PICTURES → const String
Standard directory in which to place pictures that are available to the user. [...]
'Pictures'
DIRECTORY_PODCASTS → const String
Standard directory in which to place any audio files that should be in the list of podcasts that the user can select (not as regular music). [...]
'Podcasts'
DIRECTORY_RINGTONES → const String
Standard directory in which to place any audio files that should be in the list of ringtones that the user can select (not as regular music). [...]
'Ringtones'
MEDIA_BAD_REMOVAL → const String
Storage state if the media was removed before it was unmounted. [...]
'bad_removal'
MEDIA_CHECKING → const String
Storage state if the media is present and being disk-checked. [...]
'checking'
MEDIA_EJECTING → const String
Storage state if the media is in the process of being ejected. [...]
'ejecting'
MEDIA_MOUNTED → const String
Storage state if the media is present and mounted at its mount point with read/write access. [...]
'mounted'
MEDIA_MOUNTED_READ_ONLY → const String
Storage state if the media is present and mounted at its mount point with read-only access. [...]
'mounted_ro'
MEDIA_NOFS → const String
Storage state if the media is present but is blank or is using an unsupported filesystem. [...]
'nofs'
MEDIA_REMOVED → const String
Storage state if the media is not present. [...]
'removed'
MEDIA_SHARED → const String
Storage state if the media is present not mounted, and shared via USB mass storage. [...]
'shared'
MEDIA_UNKNOWN → const String
Unknown storage state, such as when a path isn't backed by known storage media. [...]
'unknown'
MEDIA_UNMOUNTABLE → const String
Storage state if the media is present but cannot be mounted. [...]
'unmountable'
MEDIA_UNMOUNTED → const String
Storage state if the media is present but not mounted. [...]
'unmounted'