asMap method

RealmMap<RealmValue> asMap()

Casts value to a Map<String, RealmValue>. It will throw an exception if value is not a map.

Implementation

RealmMap<RealmValue> asMap() {
  if (value is RealmMap<RealmValue>) {
    return as<RealmMap<RealmValue>>();
  }

  return RealmMapInternal.createFromMap(as<Map<String, RealmValue>>());
}