How can I extend the RealModel classes?

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

class _FirstModel {
  late int first;
  late String something;

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?

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.


1 Like

That make sense, thank you.

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