Skip to content

feature_flag_sdk Free

Feature flag abstraction with multiple provider implementations.

Version: 1.0.0

Variables

VariableTypeDefaultDescription
appNamestringThe name of your application
isForMonorepobooleantrueWhether this is being generated as part of a monorepo
includeRemoteConfigbooleantrueInclude Firebase Remote Config implementation
includeFlagrbooleanfalseInclude Flagr implementation

Usage

Interactive

bash
archipelago generate feature_flag_sdk

Non-interactive (CI)

bash
archipelago generate feature_flag_sdk --config my_config.json

Config Template

json
{
  "@appName": "The name of your application",
  "appName": "MyApp",
  "@isForMonorepo": "Whether this is being generated as part of a monorepo",
  "isForMonorepo": true,
  "@includeRemoteConfig": "Include Firebase Remote Config implementation",
  "includeRemoteConfig": true,
  "@includeFlagr": "Include Flagr implementation",
  "includeFlagr": false
}

Generated Structure

Always generated:

infrastructure/
├── feature_flag_api/
│   ├── lib/
│   │   ├── feature_flag_api.dart
│   │   └── src/
│   │       ├── di/
│   │       │   └── feature_flag_injector_key.dart
│   │       └── domain/
│   │           ├── entities/
│   │           │   ├── evaluation_context.dart
│   │           │   └── feature_flag_result.dart
│   │           ├── enums/
│   │           │   └── aggregation_strategy.dart
│   │           └── repositories/
│   │               └── feature_flag_provider.dart
│   ├── pubspec.yaml
│   └── README.md
└── feature_flag_impl/
    ├── lib/
    │   ├── feature_flag_impl.dart
    │   └── src/
    │       ├── cache/
    │       │   └── feature_flag_cache.dart
    │       ├── di/
    │       │   ├── injector.config.dart
    │       │   └── injector.dart
    │       ├── feature_flag_aggregator.dart
    │       ├── feature_flag_initializer.dart
    │       └── feature_flag_manager.dart
    ├── pubspec.yaml
    └── README.md

When includeRemoteConfig is true:

infrastructure/
└── remote_config_feature_flag_impl/
    ├── lib/
    │   ├── remote_config_feature_flag_impl.dart
    │   └── src/
    │       ├── di/
    │       │   ├── injector.dart
    │       │   └── register_module.dart
    │       └── firebase_remote_config_feature_flag_provider.dart
    ├── pubspec.yaml
    └── README.md

When includeFlagr is true:

infrastructure/
└── flagr_feature_flag_impl/
    ├── lib/
    │   ├── flagr_feature_flag_impl.dart
    │   └── src/
    │       ├── di/
    │       │   ├── injector.dart
    │       │   └── register_module.dart
    │       └── flagr_feature_flag_provider.dart
    ├── pubspec.yaml
    └── README.md

Built by Banua Coder