How can I extend the RealModel classes?

In Flutter/Dart can we extend the Realm models? For example;

@RealmModel()
class _FirstModel {
  late int first;
  late String something;
}

@RealmModel()
class _SecondModel extends _FirstModel {
  late int second;
  late String secondthing;
}

I tried this and got error message _FirstModel can't be extended . How can I solve this?

Hi,
Realm does not support model hierarchy yet, so this is not allowed in the Flutter SDK as well.
We have plans on supporting this functionality in the future.

cheers.

1 Like

That make sense, thank you.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.