Install Realm - Flutter SDK
On this page
Prerequisites
- Install Flutter in your development environment. You must use Flutter version 2.8 or later and Dart version 2.15.0 or later.
Installation
Follow these steps to add the Realm Flutter SDK to your Flutter project.
In addition to using Realm with Flutter, you can also use Realm only with Dart, like a CLI application or web server.
The usage for Realm with Dart is the same as the Flutter SDK, except you must install and set up a separate package.
Create a Flutter Project
Create a Flutter project. Follow the instructions in the Flutter documentation.
flutter create <app_name> cd <app_name>
Add Realm to the Project
To add the Realm 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:
dependencies: realm: <latest_version>
Dart Standalone Installation
To use Realm 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.
Add Realm to the Project
To add the Realm 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:
dependencies: realm_dart: <latest_version>