Feature Flags in Flutter
Installation
This will add a line like this to your package's pubspec.yaml
(and run flutter pub get
):
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
Basic Usage
Initialize Toggly by running the Toggly.init
method and by providing your App Key
from your Toggly application page
Now simply wrap your widgets in Feature
widgets and provide them with the featureKeys
that best describe them.
You can also use multiple feature keys for one Feature widget and make use of the requirement (FeatureRequirement.all
, FeatureRequirement.any
) and negate
(bool) options.
Last updated