I have this operation
EventModel data = EventModel(_nameEvent, _passEvent, _localEvent, _dateEventString);
HashMap mapData = data.getEventMap();
Firestore.instance.collection("app").document("database_v1").collection("events").document().setData(mapData);
I need to show a warning if the data was entered successfully or if it was not
_scaffoldKey.currentState.showSnackBar(
SnackBar(
content: Text(message),
duration: const Duration(seconds: 6)
)
);
I tried to use .whenComplete() and then(doc), but none returns if it was successful.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)