feature_flags_toggly_isar 0.2.1 copy "feature_flags_toggly_isar: ^0.2.1" to clipboard
feature_flags_toggly_isar: ^0.2.1 copied to clipboard

Isar database persistence backend for the Toggly Flutter SDK (feature_flags_toggly), enabling offline feature flag, variant, and JWKS caching.

feature_flags_toggly_isar #

Isar database persistence backend for the Toggly Flutter SDK (feature_flags_toggly).

The Toggly SDK is memory-only by default. Add this package to persist feature flags, variant definitions, and JWKS in an Isar database so flags survive app restarts and remain available offline.

This package uses the community-maintained isar_community fork (the original isar package is no longer maintained). It is API-compatible with Isar v3.

Offline restart also requires a stable identity passed to Toggly.init / Toggly.setIdentity.

Install #

dependencies:
  feature_flags_toggly: ^1.2.0
  feature_flags_toggly_isar: ^0.1.0

Usage #

Opening Isar is asynchronous, so create the provider with IsarCacheProvider.open() before initializing Toggly:

import 'package:feature_flags_toggly/feature_flags_toggly.dart';
import 'package:feature_flags_toggly_isar/feature_flags_toggly_isar.dart';

final cacheProvider = await IsarCacheProvider.open();

await Toggly.init(
  appKey: '<your-app-key>',
  environment: 'Production',
  identity: currentUserId,
  config: TogglyConfig(
    cacheProvider: cacheProvider,
  ),
);

By default the Isar instance is created under the app documents directory; pass directory: to open() to choose another location.

Other backends #

License #

BSD-3-Clause. See LICENSE.

0
likes
120
points
174
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Isar database persistence backend for the Toggly Flutter SDK (feature_flags_toggly), enabling offline feature flag, variant, and JWKS caching.

License

BSD-3-Clause (license)

Dependencies

feature_flags_toggly, flutter, isar_community, isar_community_flutter_libs, path_provider

More

Packages that depend on feature_flags_toggly_isar