Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
Click here >
Docs Menu

Atlas Device SDK for Flutter

Utilice el SDK de dispositivos Atlas para Flutter para escribir aplicaciones cliente en DartPara la plataforma Flutter. Lea y escriba datos en dispositivos, sincronice datos con Atlas y use los servicios de aplicaciones de Atlas.

Learning Paths
Ícono de funciones

Inicio rápido

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

Consulta Ejemplos de código

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

Icono de tutorial

Guided Tutorial

Sigue un tutorial guiado para aprender a adaptar la aplicación de ejemplo y así crear tu propia aplicación funcional.

Seguir el tutorial

Qué puedes hacer

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

Puedes crear, leer, actualizar y borrar objetos de la base de datos en el dispositivo. Construir consultas complejas para filtrar datos.

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.

Ilustración móvil del SDK del dispositivo Atlas
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

Para comenzar a sincronizar datos, abre una base de datos sincronizada. Para determinar qué datos puede leer y escribir una base de datos sincronizada, suscribirse a una query.

5

Las API para leer y guardar datos son las mismas, ya sea que estés usando una base de datos sincronizada o no sincronizada. Los datos que lees y guardas se mantienen automáticamente sincronizados con tu clúster de Atlas y otros clientes. Las aplicaciones siguen funcionando sin conexión y sincronizan los cambios cada vez que hay una conexión de red disponible.

Ilustración de Device Sync

Se pueden llamar funciones sin servidor de Atlas que se ejecutan en un backend de aplicación Services desde tu aplicación cliente.

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

App Services Illustration
Documentación esencial
icono de referencia

Referencia de la API de Flutter

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

Referencia de la API de Flutter

Flutter Logo Icon

Instalar el 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.

Ícono de desconexión de Atlas Device SDK

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

Proveedor comprador

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

Example project