From 19d71e763bd189114f8a17b918f160030cb6c0fe Mon Sep 17 00:00:00 2001 From: Na Risong <54460050+HeavySnowJakarta@users.noreply.github.com> Date: Wed, 26 Mar 2025 11:42:37 +0800 Subject: [PATCH] README: implement the usage - Node the user to add `part` although the language server shows errors - The usage of embedded objects --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69cd0d18c..a9dae5aa7 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This repository holds the source code for the Realm SDK for Flutterâ„¢ and Dart ## Getting Started -* Import Realm in a dart file `app.dart` +* Import Realm in a dart file `app.dart`. Remember to add `part 'app.realm.dart'` below the imports or Realm won't generate needed objects automatically, although the language server may complain the URI does not exist. ```dart import 'package:realm/realm.dart'; // import realm package @@ -149,7 +149,7 @@ Realm Flutter package is published to [realm](https://pub.dev/packages/realm). * Create a data model class. - It should start with an underscore `_Item` and be annotated with `@RealmModel()` + It should start with an underscore `_Item` and be annotated with `@RealmModel()`. If the object needs to be used inside other data model classes, annotate with `@RealmModel(ObjectType.embeddedObject)` instead. ```dart @RealmModel()