This SDK can be used for Flutter applications. The source code for the client is available on Github.
The client library is available from the https://pub.dev/packages/flagsmith:
The SDK is initialised against a single environment within a project on https://flagsmith.com, for example the Development or Production environment. You can find your environment key in the Environment settings page.
Sign Up and create an account at https://flagsmith.com/
In your application, initialise the Flagsmith client with your API key:
if you prefer async initialization then you should use
To check if a feature flag exists and is enabled:
To get the configuration value for a feature flag:
You can use caches instead of async/await
Identifying users allows you to target specific users from the Flagsmith dashboard.
To check if a feature exists for a given user Identity:
To get the configuration value for a feature flag for given a user Identity:
To get the user traits for given user Identity:
To get user trait for given user Identity and specific Trait key:
Or get user traits for given user Identity and specific Trait keys:
To update a user trait for given user Identity:
By default, the client uses the default configuration. You can override this configuration as follows:
Override the default configuration with your own: