secure_store_plugin 0.0.3 copy "secure_store_plugin: ^0.0.3" to clipboard
secure_store_plugin: ^0.0.3 copied to clipboard

This is a plugin for storing data with high security.

Here’s a good starting README.md for your SecureStorePlugin in English:

# SecureStorePlugin

A Flutter plugin for storing data with **high-level security** on both Android and iOS.

---

## Features

- πŸ” Secure key-value storage
- βœ… Supports primitive types (`String`, `int`, `bool`, `double`)
- βœ… Supports `Map<String, dynamic>` and `List<dynamic>`
- βœ… Custom object support via `toJson` / `fromJson`
- πŸ“± Works on **Android** (Keystore / EncryptedSharedPreferences) and **iOS** (Keychain)
- ⚑ Fast and easy-to-use API

---

## Installation

Run this command:

flutter pub add secure_store_plugin

or

Add the dependency in your `pubspec.yaml`:

```yaml
dependencies:
  secure_store_plugin: ^0.0.1

Run:

flutter pub get

Usage #

Writing and reading primitive values #

await SecureStorePlugin.write<String>('token', 'abc123');
final token = await SecureStorePlugin.read<String>('token');

Writing and reading custom objects #

class User {
  final int id;
  final String name;

  const User({required this.id, required this.name});

  factory User.fromJson(Map<String, dynamic> json) =>
      User(id: json['id'], name: json['name']);

  Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
      };
}

// Store object
await SecureStorePlugin.write(
  'user',
  User(id: 1, name: 'Hung Nguyen').toJson(),
);

// Read object
final userJson = await SecureStorePlugin.read<Map<String, dynamic>>('user');
if (userJson != null) {
    final user = User.fromJson(userJson);
}

API #

Future<void> write<T>(String key, T value) #

Stores a value securely.

Future<T?> read<T>(String key) #

Reads a value securely. Returns null if the key does not exist.

Future<void> delete(String key) #

Deletes the value associated with the key.

Future<void> clear() #

Clears all stored values.


Security #

  • Android: Uses Keystore and EncryptedSharedPreferences
  • iOS: Uses Keychain

⚠️ This plugin is completely free. Do not copy, clone, or redistribute under any circumstances.


License #

MIT

7
likes
130
points
8
downloads

Publisher

verified publisherit36vn.com

Weekly Downloads

This is a plugin for storing data with high security.

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on secure_store_plugin

Packages that implement secure_store_plugin