Docs Menu

Atlas Device SDK for Flutter

Use the Atlas Device SDK for Flutter to write client applications in Dart for the Flutter platform. Read and write data on devices, sync data with Atlas, and use Atlas App Services.

Learning Paths
Functions Icon

Quick Start

Minimal-explanation code examples of how to work with the Flutter SDK.

See Code Examples

Atlas Device SDK Mobile Icon

Working Example App

Learn by example through dissecting a working app that uses the Flutter SDK.

Explore an Example App

Tutorial Icon

Guided Tutorial

Follow a guided tutorial to learn how to adapt the example app to create your own working app.

Follow the Tutorial

What You Can Do

Use the SDK's open-source database - Realm - as an object store on the device. Use Device Sync to keep data in sync with your MongoDB Atlas cluster and other clients.

1

To get started, install the Flutter SDK. Then, import the SDK in your project files.

2

Use Dart to idiomatically define an object schema.

3

You can configure your database to do things like populate initial data on load, use an encryption key to secure data, and more. To begin working with your data, configure and open a database.

4

You can create, read, update, and delete objects from the database on the device. Construct complex queries to filter data.

5

Live objects mean that your data is always up-to-date. Register a change listener to react to changes and perform logic like updating your UI.

Atlas Device SDK Mobile Illustration
1

Configure Device Sync in an App Services App. Define data access rules or use Development Mode to infer a schema from your client's data model.

2

To use the App Services App with Device Sync in your Flutter app, connect to the backend App.

3

App Services provides access to custom JWT authentication, our built-in email/password provider, anonymous authentication, and popular authentication providers like Apple, Google, and Facebook. Use these providers to authenticate a user in your client.

4

To get started syncing data, open a synced database. To determine what data a synced database can read and write, subscribe to a query.

5

The APIs to read and write data are the same whether you're using a synced or non-synced database. Data that you read and write is automatically kept in sync with your Atlas cluster and other clients. Apps keep working offline and sync changes whenever a network connection is available.

Device Sync Illustration

You can call serverless Atlas Functions that run in an App Services backend from your client application.

Authenticate users with built-in and third-party authentication providers. Use the authenticated user to access App Services.

App Services Illustration
Essential Documentation
Reference Icon

Flutter API Reference

Explore Dart and Flutter reference docs for the SDK on pub.dev.

Flutter API Reference

Flutter Logo Icon

Install the SDK

Learn how to add the SDK to your Flutter project.

Add the SDK to Flutter project

In addition to using the SDK with Flutter, you can also use the SDK with projects that just use Dart, like a CLI application or web server.

The usage for the SDK with Dart is the same as the Flutter SDK, except you must install and set up a separate package.

Learn how to set up the SDK in your Dart project.

Explore engineering and expert-provided example projects to learn best practices and common development patterns using the Flutter SDK. Check out the Example Projects page for more Flutter sample apps.

Atlas Device SDK Offline Icon

Offline Login and Database Access

Log in a Device Sync user and open a synced database offline.

Example project

Users Icon

User's Online State

Detect connectivity and activity of users and devices.

Example project

Local Atlas Device SDK Icon

Provider Shopper

Build a modified Flutter sample app that uses a non-synced database to store data on the device.

Example project