Docs Menu

Device Sync - Flutter SDK

On this page

  • What is Flexible Sync?
  • Next Steps

Atlas Device Sync automatically synchronizes data between client applications and an Atlas App Services backend application. When a client device is online, Sync asynchronously synchronizes data in the background between the device and your App Services backend.

The Flutter SDK only supports Flexible Sync. You must configure your App Services backend to use Flexible Sync.

Note

The Flutter SDK does not support Partition-Based Sync.

When you select Flexible Sync for your App Services backend configuration, your client implementation must include subscriptions to queries on queryable fields. Flexible Sync works by synchronizing data that matches query subscriptions you maintain in the client application.

A subscription set contains a set of queries. Flexible Sync returns documents matching those queries, where the user has the appropriate permissions to read or write the documents. If documents match the query, but the client does not have the permission to read or write them, they do not sync to the client application.

You can form Flexible Sync queries using a limited subset of Realm Query Language. To learn more about which fields you can query, refer to the Queryable Fields documentation.

Subscription sets are based on a specific type of realm object. To sync data for many types of Realm objects, you must have multiple subscriptions.

To use Flexible Sync in your client application, open a synced realm with a flexible sync configuration. Then, manage subscriptions to determine which documents to sync.

Before you can start syncing data from your client application using the SDK, you must enable Flexible Sync in the Atlas App Services backend.

To begin, refer to the backend documentation on enabling Atlas Device Sync.

  1. Open a Synced Realm
  2. Manage a Sync Session
←  Custom User Data - Flutter SDKOpen a Synced Realm - Flutter SDK →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.