at_app_flutter 5.1.1 at_app_flutter: ^5.1.1 copied to clipboard
A library that help developers build flutter applications on the atPlatform.
Using AtEnv #
Loading the environment #
In some cases,
AtEnv.load() can throw an error, which should not be caught.
You must ensure the following:
- The .env file exists (even if it is empty)
- The .env file is listed as a Flutter asset in pubspec.yaml
Get the root domain #
String rootDomain = AtEnv.rootDomain;
Learn more about the root domain.
Get the app namespace #
String namespace = AtEnv.appNamespace;
Learn more about the namespace.
Get the at_onboarding_flutter api key #
String? apiKey = AtEnv.appApiKey;
Learn more about the api key.
Get the at_onboarding_flutter RootEnvironment #
var apiKey = AtEnv.rootEnvironment;
The rootEnvironment is interpreted by AtEnv depending on whether the api key is available.
If the api key is not null, then AtEnv will return
If the api key is null, then AtEnv will return
*Make sure to include an api key in your .env file, before publishing your app to the store.