The App client is the interface to the Atlas App Services backend. It provides access to the authentication and Atlas Device Sync.
- Find the App ID in the Realm UI.
- Create an AppConfiguration object with your App's App ID as the argument.
- Create an App
AppConfigurationyou just created. You use this
Appinstance to access Atlas App Services features throughout your client application.
AppConfiguration appConfig = AppConfiguration(APP_ID); App app = App(appConfig);
You can create multiple
App instances to connect to multiple
Apps or to the same App with different configurations. All
App instances that share the same App ID use the same underlying
Add additional configuration for more granular control of the details of your app client, such as custom timeouts for connections and keys for local encryption. You can add optional arguments to the AppConfiguration:
AppConfiguration appConfig = AppConfiguration(APP_ID, defaultRequestTimeout: const Duration(seconds: 120), localAppVersion: '2.0' // ... see reference docs for all available configuration options );
For most use cases, you only need your application's App ID to connect to Atlas App Services. The other settings demonstrated here are optional.