website/docs/services/securestorage/index.md
import TabItem from '@theme/TabItem'; import Tabs from '@theme/Tabs'; import {ClassAll, CodeExample} from '@site/src/components/crocodocs';
A service for safely storing sensitive key–value data using the platform’s native secure storage mechanisms—Keychain on iOS/macOS, Windows Credential Manager, libsecret on Linux, and Keystore on Android.
Powered by Flutter's flutter_secure_storage package.
:::note
You need libsecret-1-dev on your machine to build the project, and libsecret-1-0 to run the application (add it as a dependency after packaging your app). If you using snapcraft to build the project use the following.
Apart from libsecret you also need a keyring service, for that you need either gnome-keyring (for Gnome users) or kwalletmanager (for KDE users) or other light provider like secret-service.
sudo apt-get install libsecret-1-dev libsecret-1-0
:::
| Platform | Windows | macOS | Linux | iOS | Android | Web |
|---|---|---|---|---|---|---|
| Supported | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Add flet-secure-storage to your project dependencies:
requirements.txt or pyproject.toml.
</TabItem>
<CodeExample path={frontMatter.examples + '/basic/main.py'} language="python" />