title: How to show date picker on the onclick of text field instead of keyboard in flutter?
body: <p>Wish to show date picker when clicking on the <code>TextFormField</code> instead of the keyboard. I have tried using <code>GestureDetector</code> but not working as I expected. </p>
  
  <pre><code>DateTime _date = new DateTime.now();
  TimeOfDay _time = new TimeOfDay.now();
  
  Future&lt;Null&gt; _selectedDate(BuildContext context) async {
    final DateTime picked = await showDatePicker(
        context: context,
        initialDate: _date,
        firstDate: new DateTime(2016),
        lastDate: new DateTime(2019));
  
    if (picked != null &amp;&amp; picked != _date) {
      print("Date selected ${_date.toString()}");
      setState(() {
        _date = picked;
      });
    }
  }
   ......
  new GestureDetector(
  
         onTap: (){
           _selectedTime(context);
               },
              child:
               new TextFormField(
                initialValue: convertToDate(_date),
                  decoration: const InputDecoration(
                    icon: const Icon(Icons.calendar_today),
                    hintText: 'Enter your date of event',
                    labelText: 'Date',
                  ),
                  keyboardType: null,
                ),
              ),
  </code></pre>