Docs Menu

Docs HomeDevelop ApplicationsAtlas Device SDKs

Install the Flutter SDK

On this page

  • Prerequisites
  • Supported Platforms
  • Installation
  • Install the SDK in a Flutter Project
  • Dart Standalone Installation
  • Update Package Version
  • Install Flutter in your development environment.

    To use the latest version of the Atlas Device SDK for Flutter, you must use:

    • Flutter version 3.10.0 or later.

    • Dart version 3.0.0 or later.

The Flutter SDK supports the following platforms:

  • iOS

  • Android

  • macOS

  • Windows running on 64-bit architecture

  • Linux running on 64-bit architecture

Important

Unsupported Platforms

The Flutter SDK does not support the following platforms:

  • Web

  • Windows running on ARM64 or 32-bit architectures

  • Linux running on ARM64 or 32-bit architectures

You can use the SDK in a Flutter project, or in a standalone Dart project.

Tip

Atlas Device SDK and Realm

The SDK uses Realm Core database for device data persistence. When you install the Flutter or Dart standalone SDK, the package names reflect Realm naming.

1

Create a Flutter project. Follow the instructions in the Flutter documentation.

flutter create <app_name>
cd <app_name>
2

To add the Flutter SDK to your project, run the command:

flutter pub add realm

This downloads the realm package and adds it to your project. In your pubspec.yaml file, you should see:

pubspec.yaml
dependencies:
realm: <latest_version>
3

To use the Flutter SDK within your app, import the package into files where you will use it:

import 'package:realm/realm.dart';

Note

Using Networking in your macOS App

If you are developing with the Flutter SDK in the macOS App Sandbox, network requests do not work by default due to built-in macOS security settings. To fix this, you must change the Flutter app's macOS network entitlements.

To learn how to do this, refer to Use the SDK with the macOS App Sandbox.

To use the SDK with Dart but not Flutter, there is a separate Dart SDK package with its own installation process. The Dart SDK can be used for CLI applications or when running Dart in a server environment. The Dart standalone package realm_dart has the same usage as the Flutter package except where otherwise noted.

1

Create a Dart project.

Note

Using Dart without Flutter

The official Dart docs have helpful getting started material for using Dart without Flutter for CLI and server use cases.

See the official documentation.

2

To add the Dart SDK to your project, run the command:

dart pub add realm_dart

This downloads the realm_dart package and adds it to your project. In your pubspec.yaml file, you should see:

pubspec.yaml
dependencies:
realm_dart: <latest_version>
3

Install the realm_dart package into the application. This downloads and copies the required native binaries to the app directory.

dart run realm_dart install
4

To use the SDK within your Dart app, import the package into files where you will use it:

import 'package:realm_dart/realm.dart';

Important

Flutter SDK v2.0.0 Breaking Change to Generated Files

Flutter SDK version 2.0.0 introduces an update to the builder, which impacts how files generate. In v2.0.0 and later, all generated files use the .realm.dart naming convention instead of .g.dart.

This is a breaking change for existing apps. For information on how to upgrade an existing app from an earlier SDK version to v2.0.0 or later, refer to Upgrade to Flutter SDK v2.0.0.

To change the version of the Flutter SDK or Dart Standalone SDK in your project, follow these steps.

← Atlas Device SDK for Flutter