FireDartCollectionReference constructor

FireDartCollectionReference(
  1. FireDartFirestoreGateway gateway,
  2. String path
)

Constructs a FireDartCollectionReference using FireDartFirestoreGateway and path.

Throws Exception if path contains odd amount of '/'.

Implementation

FireDartCollectionReference(this.gateway, String path)
    : super(gateway, path) {
  if (fullPath.split('/').length % 2 == 1) {
    throw Exception('Path is not a collection: $path');
  }
}