title: Error when add document in cloud Firestore : Unhandled Exception: Invalid argument: Instance of 'User'
body: <p>I have an error message when I add document in collection Activity in cloud firestore. </p>
  
  <p>But after I add a other document in collection discussiongroups, this action work</p>
  
  <pre><code>myFunction() async{
  
  inscris.add(widget.user);
  _auteur=widget.user.ref;
  Timestamp _dateCreate = Timestamp.now();
  
  Map mapActivity= new Map&lt;String, dynamic&gt;();
  mapActivity["description"]= _description;
  mapActivity["titre"]= _titre;
  mapActivity["inscris"]= inscris;
  mapActivity["dateCreate"]= _dateCreate;
  mapActivity["auteur"]= widget.user.ref;
  mapActivity["town"]= _adresse;
  mapActivity["nbPlaceMax"]= 12;
  mapActivity["categorie"]= "sport";
  
  List&lt;DocumentReference&gt; memberRef= new List&lt;DocumentReference&gt;();
  memberRef.add(_auteur);
  
  Map mapDiscussionGroup=new Map&lt;String, dynamic&gt;();
  mapDiscussionGroup["active"]=true;
  mapDiscussionGroup["membersRef"]=memberRef;
  mapDiscussionGroup["titre"]= _titre;
  
  callAddActivityFireHelper(mapActivity);
  await Fire_helper().addGroupDiscussion(uidDiscussionGroups,mapDiscussionGroup);}
  
  
  
  void callAddActivityFireHelper(Map mapActivity) async {
  await Fire_helper().addActivity(mapActivity);
  }
  addActivity(Map&lt;String, dynamic&gt; map) async {
  
  await fire_Activity.document().setData(map);
  }
  </code></pre>
  
  <p>error message : [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Invalid argument: Instance of 'User'</p>