If you are using cloud_firestore try the code below
cloud_firestore
await FirebaseFirestore.instance.collection("registrations").doc().set({ "fullName": fullNameController.text.trim(), "email": emailController.text.trim(), // more fields... });