api_cache_manager 1.0.0 api_cache_manager: ^1.0.0 copied to clipboard
A new Flutter package project.
api_cache_manager #
API Cache Manager is a Utility package built with Flutter SDK and SQLite Package. This package will help to make your Rest API store in the local db for offline access.
Features #
- Offline Integration of Rest API.
- Faster Data rendering.
- Avoid Unnecessary HTTP Get Requests.
- App will work without Internet also.
- Speed up the application.
Install #
Add this to your pubspec.yaml file:
dependencies:
api_cache_manager: ^1.0.0
Usage #
The cache manager can be used to store the rest api data in the local db for offline access.
var cacheData = await APICacheManager().addCacheData(APICacheDBModel);
isAPICacheKeyExist(keyName)
returns true/false based on the key name.
addCacheData(APICacheDBModel)
save the Rest API data in the local DB with APICacheDBModel(key, syncData).
getCacheData(keyName)
return the cache data on the basis of key name.
getFileFromCache
only retrieves from cache and returns no file when the file is not in the cache.
emptyCache
removes all the data from the cache.
Donate #
If you like my work, you can support me buying a cup of ☕
Copyright & License #
Code and documentation Copyright 2021 SnippetCoder. Code released under the Apache License. Docs released under Creative Commons.