Reference.create constructor

Reference.create(
  1. FirestoreGateway gateway,
  2. String path
)

Implementation

factory Reference.create(FirestoreGateway gateway, String path) {
  return _trimSlashes(path).split('/').length % 2 == 0
      ? DocumentReference(gateway, path)
      : CollectionReference(gateway, path);
}