rivium_flutter_flags 0.1.0 copy "rivium_flutter_flags: ^0.1.0" to clipboard
rivium_flutter_flags: ^0.1.0 copied to clipboard

Feature Flags SDK for Flutter - Lightweight feature flag management with Rivium. Pure Dart, works on all platforms.

Rivium Flutter Flags #

Feature Flags SDK for Flutter - Lightweight feature flag management with Rivium. Pure Dart, works on all platforms (iOS, Android, Web, macOS, Windows, Linux).

Features #

  • Feature flag evaluation with server-side and local fallback
  • Offline support with local caching
  • Rollout percentage targeting
  • User attribute targeting rules
  • Multivariate flags with weighted variants
  • Environment overrides (development, staging, production)

Installation #

dependencies:
  rivium_flutter_flags: ^0.1.0
flutter pub get

Quick Start #

import 'package:rivium_flutter_flags/rivium_flutter_flags.dart';

// Initialize
final flags = await RiviumFeatureFlags.init(
  RiviumFeatureFlagsConfig(apiKey: 'rv_live_xxx'),
);

// Set user ID for rollout targeting
await flags.setUserId('user-123');

// Check if a feature is enabled
if (await flags.isEnabled('dark-mode')) {
  // Show dark mode
}

// Get flag value
final value = await flags.getValue('banner-text', defaultValue: 'Welcome');

// Set user attributes for targeting rules
flags.setUserAttributes({'plan': 'pro', 'country': 'US'});

// Refresh flags from server
await flags.refresh();

Environment Overrides #

final flags = await RiviumFeatureFlags.init(
  RiviumFeatureFlagsConfig(
    apiKey: 'rv_live_xxx',
    environment: 'staging', // or 'development', 'production'
  ),
);

Multivariate Flags #

final result = await flags.evaluate('checkout_flow');
print(result.enabled);  // true/false
print(result.value);    // variant value
print(result.variant);  // variant key

License #

MIT

0
likes
150
points
91
downloads

Documentation

API reference

Publisher

verified publisherrivium.co

Weekly Downloads

Feature Flags SDK for Flutter - Lightweight feature flag management with Rivium. Pure Dart, works on all platforms.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

connectivity_plus, crypto, http, shared_preferences

More

Packages that depend on rivium_flutter_flags