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

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.

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.1
copied to clipboard

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);
copied to clipboard

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.

deleteCache(keyName) this will remove the specific cache from the db on the basis of keyname.

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.

146
likes
140
points
990
downloads

Publisher

verified publishersnippetcoder.com

Weekly Downloads

2024.10.03 - 2025.04.17

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.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, path, sqflite

More

Packages that depend on api_cache_manager