configbee_flutter 0.0.2-alpha.0
configbee_flutter: ^0.0.2-alpha.0 copied to clipboard
Flutter SDK for Configbee - A feature flags and remote configuration management client library
ConfigBee Flutter SDK #
Dynamic feature flags and configuration management for Flutter applications.
Website | Documentation | Flutter SDK Docs
About #
The ConfigBee Flutter SDK lets you integrate feature flags and remote configuration into your Flutter app. Control your app's behavior without redeploying.
Key Features #
- π Easy integration with Flutter (iOS, Android, Web, Desktop)
- π― User targeting with custom properties
- π Real-time feature flag updates via Server-Sent Events (SSE)
- π Multiple value types (boolean flags, numbers, text, JSON)
- π§© Flutter-native widgets:
ConfigbeeProvider,ConfigbeeBuilder,ConfigbeeFlag - πΎ Local caching for offline support
- β‘ Automatic retry and fallback mechanisms
Status #
β οΈ This SDK is currently in alpha. APIs may change before the stable release.
Installation #
flutter pub add configbee_flutter
π‘ If the above doesn't install the latest version, specify it explicitly:
flutter pub add 'configbee_flutter:^0.0.1-alpha.1'
Usage #
π For the full documentation, visit docs.configbee.com/client-sdks/flutter/
import 'package:configbee_flutter/configbee_flutter.dart';
void main() {
final cb = ConfigbeeClient.init(
ConfigbeeClientParams(
accountId: "YOUR_ACCOUNT_ID",
projectId: "YOUR_PROJECT_ID",
environmentId: "YOUR_ENVIRONMENT_ID",
),
);
runApp(ConfigbeeProvider(client: cb, child: const MyApp()));
}
ConfigbeeFlag β declarative flag-based widget switching #
ConfigbeeFlag(
flagKey: 'new_checkout_ui',
onEnabled: const NewCheckoutPage(),
onDisabled: const OldCheckoutPage(),
onLoading: const CircularProgressIndicator(),
)
ConfigbeeBuilder β reactive access to all config values #
ConfigbeeBuilder(
builder: (context, status, client) {
if (status != CbStatus.active) return const CircularProgressIndicator();
return Text(client.getText('welcome_message') ?? 'Welcome!');
},
)
Direct client access #
final cb = ConfigbeeProvider.of(context);
bool? isEnabled = cb.getFlag('new_feature');
num? maxRetries = cb.getNumber('max_retries');
String? apiEndpoint = cb.getText('api_endpoint');
Map<String, dynamic>? theme = cb.getJson('theme_config');
Targeting #
// On login
cb.setTargetProperties({'user_id': '12345', 'plan': 'premium'});
// On logout
cb.unsetTargetProperties();
Platform Support #
| Platform | Supported |
|---|---|
| Android | β |
| iOS | β |
| Web | β |
| macOS | β |
| Windows | β |
| Linux | β |