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

A super-duper-mega-ultra-extra fast, light and synchronous key-value storage written.

LiteStorage #

A super-duper-mega-ultra-extra fast, light and synchronous key-value storage written.

Installation #

Add this to your package's pubspec.yaml file and then run pub get:

dependencies:
  lite_storage: 
    git:
      url: https://github.com/ArZHa03/lite_storage.git

Usage #

First, initialize the storage:

await LiteStorage.init(); // init first

Example CRUD Operations

// Write a value
LiteStorage.write('token', '!@#$%^&*'); // over/write key token on storage

// Read a value
String? token = LiteStorage.read<String>('token'); // read storage with key token : "!@#$%^&*"

// Remove a value
LiteStorage.remove('token'); // delete key token on storage

// Clear all values
LiteStorage.erase(); // delete all data storage

API #

Methods

  • Future<void> init([String container = 'LiteStorage']): Initialize the storage.
  • T? read<T>(String key): Read a value from the storage.
  • void write(String key, dynamic value): Write a value to the storage.
  • void remove(String key): Remove a value from the storage.
  • void erase(): Clear all values from the storage.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
130
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A super-duper-mega-ultra-extra fast, light and synchronous key-value storage written.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, path_provider

More

Packages that depend on lite_storage