resolveReference method

Future<Reference?> resolveReference(
  1. Reference ref, {
  2. bool recursive = true,
})

Implementation

Future<Reference?> resolveReference(Reference ref,
    {bool recursive = true}) async {
  if (ref.type == ReferenceType.Hash) {
    return ref;
  }

  var resolvedRef = await refStorage.reference(ref.target!);
  if (resolvedRef == null) {
    return null;
  }
  return recursive
      ? resolveReference(resolvedRef) as FutureOr<Reference?>
      : resolvedRef;
}