link property

String? link
The unique and permanent link to the resource.

Implementation

String? get link {
  if (_store != null)
    return _store?.link(_resource);
  else {
    var l = <String>[];

    var p = _resource;

    while (true) {
      if (p.instance != null) break;
      var pi = p.instance as Instance;

      l.insert(0, pi.name);

      if (pi.parents.count == 0) break;

      p = pi.parents.first;
    }

    return l.join("/");
  }
}