Feature Flags SDK
Lightweight, fast feature flag SDK for Flutter apps. Toggle features remotely without rebuilding your app.
Works with the Feature Flags Backend + Dashboard built.
Features
- API key based authentication
- Fast flag fetch
- Local cache & offline fallback
- Simple API (
isEnabled) - Works with any Flutter app
- Supports multiple environments
- Secure (hashed keys, no secrets stored)
- Production ready
Sign Up for API Key
To get started, sign up at Feature Flag Dashboard to obtain your API key. After signing up, you can create feature flags on the dashboard to use in your app.
Installation
Add to pubspec.yaml:
dependencies:
feature_flags: 0.0.3
Quick Start
1. Initialize SDK
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await FeatureFlagSDK.init(
apiKey: "YOUR_API_KEY",
);
runApp(MyApp());
}
2. Use flags anywhere
if (FeatureFlagSDK.isEnabled("new_home")) {
return NewHome();
} else {
return OldHome();
}
Fallback values
FeatureFlagSDK.isEnabled("new_home", fallbackValue: false);
Offline support
If network fails:
- last known flags are used
- app never crashes
- perfect for production
Security model
- SDK uses API keys, not JWT
- Keys are scoped to environment
- Backend stores only hashed keys
- Safe to ship in production apps
Example
Text(
FeatureFlagSDK.isEnabled("new_home")
? "New UI"
: "Old UI",
);
Dispose (optional)
FeatureFlagSDK.dispose();
Roadmap
Stream updates (no rebuild)Widget builderPercentage rolloutUser targetingAndroid SDKiOS SDKReact SDKWeb SDK
Why this exists
This SDK is:
- fast
- simple
- free
- perfect for indie apps & startups
Reach out on GitHub https://github.com/charanprasanth if you have ideas feedback or want to contribute If you use this in production, star the repo!