api_cache_manager 1.0.0 copy "api_cache_manager: ^1.0.0" to clipboard
api_cache_manager: ^1.0.0 copied to clipboard

outdated

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.

pub package

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 ☕

Code and documentation Copyright 2021 SnippetCoder. Code released under the Apache License. Docs released under Creative Commons.

148
likes
0
points
1.12k
downloads

Publisher

verified publishersnippetcoder.com

Weekly Downloads

A new Flutter package project.

Homepage

License

unknown (license)

Dependencies

flutter, path, sqflite

More

Packages that depend on api_cache_manager