collection method

CollectionReference<Map<String, dynamic>> collection(
  1. String collectionPath
)

Gets a CollectionReference for the nested collection.

Parameters:

  • collectionPath: The path to the collection.

Returns: A CollectionReference instance.

Example:

var subCollection = docRef.collection('orders');

Implementation

CollectionReference<Map<String, dynamic>> collection(String collectionPath) {
  CollectionReference<Map<String, dynamic>> col =
      CollectionReference<Map<String, dynamic>>(
        helper: QueryHelper(),
        oracledb: _oracledb,
        path: "${_path.join('/')}/$collectionPath",
        parent_: this,
      );
  col.toConverter = this.toConverter;
  col.fromConverter = this.fromConverter;
  return col;
}