GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ZuopanYao/plain_cache: Persistent cache library for Dart(Flutter for iOS and Android).

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
example
example
 
 
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
analysis_options.yaml
analysis_options.yaml
 
 
pubspec.yaml
pubspec.yaml
 
 

Repository files navigation

plain_cache

Pub Package

Persistent cache library for Dart(Flutter for iOS and Android).

Installing

With Flutter:

flutter pub add plain_cache

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  plain_cache: ^1.0.3

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Usage

Enable plain cache

import 'package:plain_cache/plain_cache.dart';

void main() {
  // Enable Plain Cache
  PlainCache.enable();

  runApp(MyApp());
}

simple usage example:

Save to persistent cache / 保存数据到持久性缓存

 storage.setValue('newValue', forKey: 'MyKey');

Read from persistent cache / 从持久性缓存中读取数据

final boolValue = storage.getBool(forKey: 'MyKey');
final doubleValue = storage.getDouble(forKey: 'MyKey');
final intValue = storage.getInt(forKey: 'MyKey');
final listValue = storage.getList(forKey: 'MyKey');
final mapValue = storage.getMap(forKey: 'MyKey');
final stringValue = storage.getString(forKey: 'MyKey');

Remove from persistent cache / 从持久性缓存中删除数据

storage.remove(forKey: 'MyKey');

License / 许可证

plain_cache is released under the MIT license. See LICENSE for details.

plain_cache 是在 MIT 许可下发布的,有关详情请查看该许可证。

About

Persistent cache library for Dart(Flutter for iOS and Android).

Topics

cache-storagedartflutterflutterandroidflutteriospersistent

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.