'a document path must be a non-empty string 'package:cloud_firestore/src/collection_reference.dart'Failed assertion: line 116 pos 14: 'path.isNotEmpty'

enter image description here

Widget catageriesList(String airportId, locationId) {
    return Container(
      child: StreamBuilder<QuerySnapshot>(
        stream: FirebaseFirestore.instance.collection("Airport").doc(widget.airportId).collection("location").doc(locationId).collection("Catagorie").snapshots(),
        builder: (context, snapshot) {
          return snapshot.data == null
              ? Container() : ListView.builder(
              itemCount: snapshot.data!.docs.length,
              itemBuilder: (context, index) {
                DocumentSnapshot data = snapshot.data!.docs[index];
                print("object");
                return Catageries(
                  catagerieId: data["Catagorie_id"],
                  catagerieName:  data["Catagorie_name"],
                );
              }
          );
        },
      ),
    );
  }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source