title: How to select Birth date with DateFormat in flutter?
body: <p>I have a field with birth Date format.</p>
  
  <p>I tried some code but it's showing date as well as time but I want only Date.</p>
  
  <p>is there any perfect way for it?</p>
  
  <p>variables</p>
  
  <pre><code>String initValue="Select your Birth Date";
  bool isDateSelected= false;
  DateTime birthDate; // instance of DateTime
  String birthDateInString;
  </code></pre>
  
  <p>here the code for dateTime picker.</p>
  
  <pre><code>GestureDetector(
     child: new Icon(Icons.calendar_today),
     onTap: ()async{
       final datePick= await showDatePicker(
          context: context,
          initialDate: new DateTime.now(),
          firstDate: new DateTime(1900),
          lastDate: new DateTime(2100)
         );
      if(datePick!=null &amp;&amp; datePick!=birthDate){
        setState(() {
          birthDate=datePick; 
          isDateSelected=true;
          birthDateInString = "${birthDate.month}/${birthDate.day}/${birthDate.year}"; 
        });
       }
     }
   )
  </code></pre>
  
  <p>this widget is for showing Date</p>
  
  <pre><code> new Text(isDateSelected ? "$birthDate":initValue),
  </code></pre>