easy_utils library
Classes
- BinaryReader
- The BinaryReader is used to bring data back from the binary format on the disk.
- BinaryWriter
- The BinaryWriter is used to encode data to the binary format.
-
Box<
E> - Boxes contain all of your data. In the browser, each box has its own IndexedDB database. On all other platforms, each Box is stored in a separate file in the Hive home directory.
-
BoxBase<
E> - Boxes contain all of your data. In the browser, each box has its own IndexedDB database. On all other platforms, each Box is stored in a seperate file in the Hive home directory.
- BoxCollection
- BoxEvent
- A event representing a change in a box.
-
CollectionBox<
V> - represents a Box being part of a BoxCollection
- Digest
-
A message digest as computed by a
HashorHMACfunction. - Hash
- An interface for cryptographic hash functions.
- HiveAesCipher
- Default encryption algorithm. Uses AES256 CBC with PKCS7 padding.
- HiveCipher
- Abstract cipher can be implemented to customize encryption.
-
HiveCollection<
E extends HiveObjectMixin> - List containing HiveObjectMixins.
- HiveField
- Annotate all fields you want to persist with HiveField.
- HiveInterface
-
The main API interface of Hive. Available through the
Hiveconstant. -
HiveList<
E extends HiveObjectMixin> - Allows defining references to other HiveObjectMixins.
- HiveObject
- HiveType
-
Annotate classes with HiveType to generate a
TypeAdapter. - Hmac
- An implementation of keyed-hash method authentication codes.
-
LazyBox<
E> - LazyBoxes don't keep the values in memory like normal boxes. Each time a value is read, it is loaded from the backend.
- LexoRank
- LexoRank 高效排序算法实现 支持千万级别数据量,生成不重复的排序字符串
- Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing a persistent store for simple data.
- Provides a persistent store for simple data.
- Basic options for creating SharedPreferencesAsync classes.
- Provides a persistent store for simple data.
- Options necessary to create a SharedPreferencesWithCache.
-
TypeAdapter<
T> - Type adapters can be implemented to support non primitive values.
- TypeRegistry
- TypeRegistries contain the TypeAdapters associated with a typeId.
Enums
- HiveStorageBackendPreference
- declares the preferred JS StorageBackend to be used
- LexoDataScale
- 数据量级配置枚举
- StorageDirectory
-
Corresponds to constants defined in Androids
android.os.Environmentclass.
Mixins
- HiveObjectMixin
-
Extend
HiveObjectto add useful methods to the objects you want to store in Hive
Constants
- md5 → const Hash
- An implementation of the MD5 hash function.
- sha1 → const Hash
- An implementation of the SHA-1 hash function.
- sha224 → const Hash
- An implementation of the SHA-224 hash function.
- sha256 → const Hash
- An implementation of the SHA-256 hash function.
- sha384 → const Hash
- An implementation of the SHA-384 hash function.
- sha512 → const Hash
- An implementation of the SHA-512 hash function.
- sha512224 → const Hash
- An implementation of the SHA-512/224 hash function.
- sha512256 → const Hash
- An implementation of the SHA-512/256 hash function.
Properties
- disablePathProviderPlatformOverride ← bool
-
no getter
- Hive → HiveInterface
-
Global constant to access Hive.
final
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.
Typedefs
- CompactionStrategy = bool Function(int entries, int deletedEntries)
- A function which decides when to compact a box.
- KeyComparator = int Function(dynamic key1, dynamic key2)
Exceptions / Errors
- HiveError
- An error related to Hive.
- MissingPlatformDirectoryException
- An exception thrown when a directory that should always be available on the current platform cannot be obtained.