Data Types - Flutter SDK
On this page
The Flutter SDK currently only supports Dart-language data types. The Flutter SDK does not support MongoDB.BSON types or Realm-specific types at the moment.
Dart Types
Realm supports the following Dart language data types:
int
double
bool
String
List<T>
, where T is any of the supported data types or a RealmModel
Reference Realm Objects
You can also reference one or more Realm objects from another. Learn more in the relationship properties documentation.
Example
Example
Model with supported data types
part 'car.g.dart'; ()class _Car { () late int id; String? licensePlate; bool isElectric = false; double milesDriven = 0; late List<String> attributes; late _Person? owner; } ()class _Person { () late int id; late String name; late int age; }