Skip to content
pubscout

growthbook_sdk_flutter

5.0.0, released 3 weeks ago by growthbook.io

Feature flagging and A/B testing platform client for Flutter apps.

$ flutter pub add growthbook_sdk_flutter
Source repository

What it does

Allows your Flutter application to connect to GrowthBook to toggle features on and off without new deployments, run A/B tests, and track experiment metrics. Supports smart caching, sticky bucketing, and remote evaluation.

AI-written summary of version 5.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to run A/B tests and experiments with statistical significance in a Flutter app
  • You want to toggle features dynamically via remote configuration
  • You require user targeting and segmentation rules

Skip it when

  • You do not use the GrowthBook experimentation platform
  • You only need simple local configuration files without remote synchronization

Strengths

  • Full support for feature flags, A/B testing, and sticky bucketing
  • Smart caching with TTL and stale-while-revalidate for offline resilience
  • Cross-platform support across mobile, desktop, and web

Weaknesses

  • Requires a GrowthBook backend or proxy setup
  • Major version upgrades can introduce strict breaking changes regarding targeting conditions and type safety

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
8

Initialize the SDK using GBSDKBuilderApp with your GrowthBook API key and host URL during app startup.

final sdk = await GBSDKBuilderApp(
  apiKey: "sdk_your_api_key",
  hostURL: "https://growthbook.io",
).initialize();
final welcomeMessage = sdk.feature('welcome_message');
if (welcomeMessage.on) {
  print('Feature is enabled: ${welcomeMessage.value}');
}

Alternatives

Packages that do the same job and could replace growthbook_sdk_flutter.

Works with

Packages commonly used together with growthbook_sdk_flutter: ones it builds on, ones built on it, and its own family.