# Custom Storage

The plugin has no storage adapter. `DetourConfig` takes no storage argument, so
you cannot pass a Flutter-level storage engine such as Hive or Secure Storage to
Detour.

## Where state is stored

Detour persists two values, a first-entrance flag and an analytics device id, and each native SDK keeps them in its own default store:

- **Android** — `SharedPreferences`, in a file named `Detour`, under the keys `Detour_firstEntranceFlag` and `Detour_deviceId`.
- **iOS** — `UserDefaults.standard`, under the keys `DetourFirstEntranceFlag` and `Detour_deviceId`.

## What this means

- Deferred-link first-launch behavior follows the native persisted state, not anything your Dart code holds.
- Clearing app data or reinstalling resets both values. That is how you retest a deferred flow. See [Testing & Troubleshooting](https://detour.swmansion.com/docs/sdk/flutter/testing).

:::note[Custom storage]
The Android native SDK accepts a custom `DetourStorage`, but the Flutter bridge does not forward one. It cannot be configured from Dart.
:::

## Related pages

- [Usage](https://detour.swmansion.com/docs/sdk/flutter/sdk-usage)
- [API Reference](https://detour.swmansion.com/docs/sdk/flutter/api-reference)