'Put information in a specific sub-categories, flutter, firebase

I would like to upload informations in my UID doc, but the information is stored in another subcategory.

enter image description hereenter image description here

Future postDetailsToFirestore() async {
    FirebaseFirestore firebaseFirestore = FirebaseFirestore.instance;

    ProModel proModel = ProModel();
    UserModel userModel = UserModel();
    
    await firebaseFirestore
        .collection("pros")
        .doc(proModel.proId)
        .collection("post")
        .doc()
        .set(proModel.toMap());

    Fluttertoast.showToast(msg: "Compte pro créé ");
  }


Sources

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

Source: Stack Overflow

Solution Source