Home > front end >  How to create Flutter Firebase Firestore ArrayList?
How to create Flutter Firebase Firestore ArrayList?

Time:04-08

I want to create an ArrayList in Firebase Firestore with Flutter. There will be no items in it. How can I do that?

users.doc(idToken).set({
   'email': _registerEmail.text,
   'name-surname': _registerNameSurname.text,
   'list': "ArrayList code" // ArrayList,
});

CodePudding user response:

Just give an empty list as an argument:

users.doc(idToken).set({
   'email': _registerEmail.text,
   'name-surname': _registerNameSurname.text,
   'list': [],
});
  • Related