Skip to content

dreamsoftin/obscured_preferences

Repository files navigation

obscured_preferences

This package makes use of shared_preferences and encrypt packages to provide encrypted shared preferences.

Usage

The syntax and usage of this package is the same as that of shared_preferences.

import 'package:flutter/material.dart';
import 'package:obscured_preferences/obscured_preferences.dart';


void savePrefs() async {

    ObscuredPrefs prefs = await ObscuredPrefs.getInstance();

    await prefs.setString('key', 'Hello World!');

    final strValue = prefs.getString('key');
}