jh_services 0.1.0 jh_services: ^0.1.0 copied to clipboard
A lightweight service package for Flutter to handle network requests, local storage, and connectivity seamlessly with best practices.
Changelog #
[0.1.0] - 2024-11-02 #
Added on SharedPrefsService
#
- saveDateTime: Method to save a
DateTime
value as a string. - getDateTime: Method to retrieve a
DateTime
value. - updateOrAppendToStringList: Method to update or append to a string list.
- saveBulk: Method to save multiple key-value pairs in one go.
- getBulk: Method to retrieve multiple values for a list of keys.
- incrementOrInitInt: Method to increment or initialize an integer value.
- decrementInt: Method to decrement an integer value.
- toggleBool: Method to toggle a boolean value.
- addToStringList: Method to add a single item to a list of strings.
- removeFromStringList: Method to remove a single item from a list of strings.
- getAll: Method to retrieve all key-value pairs.
- saveJson: Method to save a JSON object by encoding it as a string.
- getJson: Method to retrieve a JSON object by decoding a stored string.
- resetToDefaults: Method to reset a list of keys to specified default values.
- getKeysByPrefix: Method to retrieve all keys that start with a specified prefix.
- getItemCount: Method to count the number of stored items.
- batchIncrementInts: Method for batch update to increment multiple integer keys by specified values.
- retrieveAndRemove: Method to retrieve and remove values for a list of keys.
- getValue: Method to retrieve a value by type.
- getKeys: Method to retrieve all keys.