tarsier_storage
library
Enums
BackupStatus
Enum representing different statuses during a backup process.
DatabaseUse
Defines the supported database adapters that can be used by the application.
RestoreStatus
Enum representing different statuses during a restore process.
StorageDirectory
Corresponds to constants defined in Androids android.os.Environment class.
Functions
getApplicationCacheDirectory ()
→ Future <Directory >
Path to a directory where the application may place application-specific
cache files.
getApplicationDocumentsDirectory ()
→ Future <Directory >
Path to a directory where the application may place data that is
user-generated, or that cannot otherwise be recreated by your application.
getApplicationSupportDirectory ()
→ Future <Directory >
Path to a directory where the application may place application support
files.
getDownloadsDirectory ()
→ Future <Directory ? >
Path to the directory where downloaded files can be stored.
getExternalCacheDirectories ()
→ Future <List <Directory > ? >
Paths to directories where application specific cache data can be stored
externally.
getExternalStorageDirectories ({StorageDirectory ? type })
→ Future <List <Directory > ? >
Paths to directories where application specific data can be stored
externally.
getExternalStorageDirectory ()
→ Future <Directory ? >
Path to a directory where the application may access top level storage.
getLibraryDirectory ()
→ Future <Directory >
Path to the directory where application can store files that are persistent,
backed up, and not visible to the user, such as sqlite.db.
getTemporaryDirectory ()
→ Future <Directory >
Path to the temporary directory on the device that is not backed up and is
suitable for storing caches of downloaded files.
printDebug (Object ? object )
→ void
Prints the log only if the app is in debug mode.
This helps control the verbosity of logs in production environments.
printError (String tag , String message , [String icon = '⛔' ])
→ void
Prints an error message in red with a special error icon and color formatting.
This is used for logging critical issues or errors that need immediate attention.
printInfo (String tag , String message , [String icon = '💡' ])
→ void
Prints an informational message in blue, often used for general logs or status updates.
printLog (String tag , String message , [String icon = '' ])
→ void
Prints a general log message with optional tag and icon, using the default print() format.
The message is color-coded based on the level (info, success, warning, etc.).
printSuccess (String tag , String message , [String icon = '✅' ])
→ void
Prints a success message in green, commonly used for indicating successful actions or results.
printVerbose (String tag , String message , [String icon = '🚀' ])
→ void
Prints a verbose or debug message in purple, used for detailed debugging or information that may be helpful during development.
printWarning (String tag , String message , [String icon = '⚡' ])
→ void
Prints a warning message in yellow, used for non-critical issues that may require attention.
Exceptions / Errors
MissingPlatformDirectoryException
An exception thrown when a directory that should always be available on
the current platform cannot be obtained.