Is there any way to do an update to a document if exists else create a document. Now I am using the update
method but if the document does not exist then it will throw an error message.
Firestore.instance.collection('partnerRequests').document(user.uid).updateData( {
DateTime.now().millisecondsSinceEpoch.toString():partnerRegistrationFormData})
Unhandled Exception: type 'PlatformException' is not a subtype of type 'String'