add method
Method to add a new document to the collection.
Parameters:
data
: The data to be added to the new document.
Example:
collectionRef.add({'name': 'John', 'age': 30});
Implementation
void add(Data data) => set(id, data);
Method to add a new document to the collection.
Parameters:
data
: The data to be added to the new document.Example:
collectionRef.add({'name': 'John', 'age': 30});
void add(Data data) => set(id, data);