flutter_cache 0.0.1 copy "flutter_cache: ^0.0.1" to clipboard
flutter_cache: ^0.0.1 copied to clipboard

outdated

A new Flutter package project.

flutter_cache #

A simple cache package for flutter. This package is actually a wrapper for SharedPreferences on Flutter.

Getting Started #

What Can this Package Do ? #

  1. Cache String, List
  2. Load the cache you've cached.
  3. Clear All Cache.
  4. Clear Single Cache.

Usage #

This package has multiple static methods.

// This will cached `data` by its key `key`
// The Data can be String, List<String>, List<Map> and Map Type.
Cache.remember('data', 'key'); 

// The third argument is optional. It's for limited time caching.
// This will cache the data for 120 sec, or 2 minutes.
Cache.remember('data', 'key', 120); 

You can also use it this way.

// What this will do is remember() will return `data` if it's still                                                          // available in cache. If it's not available, it will return nothing                                                           // and cache the data instead.
String data = await Cache.remember('data', 'key', 120); 

Cache.load('key) // This will load the cache data.
Cache.destroy('key')
Cache.clear()

22
likes
0
points
1.84k
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package project.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on flutter_cache