getAttributes method

  1. @override
Future<Attributes> getAttributes()

Gets the attributes of this map.

Implementation

@override
Future<Attributes> getAttributes() async {
  if (!isDropped) {
    NitriteMap<String, Document> metaMap = await getStore().openMap(
      metaMapName,
    );

    if (name != metaMapName) {
      var attributesDoc = await metaMap[name];
      var attributes = attributesDoc == null
          ? Attributes()
          : Attributes.fromDocument(attributesDoc);
      return attributes;
    }
  }
  return Attributes();
}