getPathToDocument method

  1. @visibleForTesting
String getPathToDocument(
  1. List<String> paths
)

Implementation

@visibleForTesting
String getPathToDocument(List<String> paths) {
  assert(paths.isNotEmpty, 'paths cannot be empty. It at least has to contain of `collection` and `document` pair.');
  assert(
    paths.length % 2 == 0,
    'paths must not be even number. It seems you are pointing to the collection instead of the document. Double check if ${paths.last} is a document.',
  );
  return paths.join('/');
}