title: How to onClick listener on DropdownMenuItem
body: <p>I have build the code of DropdownMenuItem, now when i click an item from dropdownmenuitem it should move to another screen.Below is the code</p>
  
  <pre><code>class TimesScreen extends StatefulWidget {
    @override
    _TimesScreenState createState() =&gt; _TimesScreenState();
  }
  
  class _TimesScreenState extends State&lt;TimesScreen&gt; {
    var gender;
  @override
    Widget build(BuildContext context) {
  DropdownButton(
                       hint: Text("Select",
                       style: TextStyle(color: Colors.white),),
                       onChanged: (val){
                           setState(() {
                             this.gender=val;
                           });
                       },
                       value: this.gender,
                       items: [
                         DropdownMenuItem(
                           //onTap:
                           value: 'Earth',
                           child: Text('Earth'
                          ),
                         ),
                         DropdownMenuItem(
                          //onTap:
                           value: 'Mars',
                           child: Text('Mars'
                          ),
                         ),)]
  </code></pre>