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': [],
});