configcat_client 3.0.0 copy "configcat_client: ^3.0.0" to clipboard
configcat_client: ^3.0.0 copied to clipboard

Dart (Flutter) SDK for ConfigCat. ConfigCat is a hosted feature flag service that lets you manage feature toggles across frontend, backend, mobile, desktop apps.

example/lib/main.dart

import 'package:configcat_client/configcat_client.dart';

Future<void> main() async {
  final client = ConfigCatClient.get(
      sdkKey: 'PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ',
      options: ConfigCatOptions(
          logger: ConfigCatLogger(
              // Info level logging helps to inspect the feature flag evaluation process.
              // Use the default Warning level to avoid too detailed logging in your application.
              level: LogLevel.info)));

  final isAwesomeFeatureEnabled = await client.getValue(
      key: 'isAwesomeFeatureEnabled', defaultValue: false);

  print("isAwesomeFeatureEnabled: $isAwesomeFeatureEnabled");

  final user = ConfigCatUser(
      identifier: '#SOME-USER-ID#', email: 'configcat@example.com');

  final isPOCFeatureEnabled = await client.getValue(
      key: 'isPOCFeatureEnabled', defaultValue: false, user: user);

  print("isPOCFeatureEnabled: $isPOCFeatureEnabled");

  client.close();
}
5
likes
160
pub points
84%
popularity

Publisher

verified publisherconfigcat.com

Dart (Flutter) SDK for ConfigCat. ConfigCat is a hosted feature flag service that lets you manage feature toggles across frontend, backend, mobile, desktop apps.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

crypto, dio, json_annotation, pub_semver

More

Packages that depend on configcat_client