title: flutter navigation to new screen not working
body: <p>I am building a login screen that passes data to a home screen and when I click on the login button nothing happens. No error but also no sending to a new screen.</p>
  
  <p>here is the button code:</p>
  
  <pre><code>    Widget submitButton()
      {
   return Container(
          margin: EdgeInsets.all(10.0),
          child:RaisedButton(
          child: Text('LOGIN'),
          onPressed: (){
            if(formKey.currentState.validate()){
  
              formKey.currentState.save();
               print('Time to save $emailAddress and $passWord to my API');
               Navigator.push(
                 context,
                        new MaterialPageRoute(
                       builder: (BuildContext context) =&gt;
                       new Home()));
  
                    }
                 },
  
          )
   );
  </code></pre>
  
  <p>here is my routes.dart file</p>
  
  <pre><code> import 'package:flutter/material.dart';
   import '../screens/home.dart';
   import 'package:lbconnectv3/main.dart';
  
   final routes = {
    '/home':         (BuildContext context) =&gt; new Home(),
     '/' :          (BuildContext context) =&gt; new LBConnectApp(),
     };
  </code></pre>
  
  <h2>EDIT</h2>
  
  <p>FULL CODE for main.dart, it basically has a form with 2 text fields for a login. No errors in console and it enters the if statement.</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'utils/validation.dart';
  import 'screens/home.dart';
  import 'utils/routes.dart';
  
   void main() =&gt; runApp(new LBConnectApp());
  
    class LBConnectApp extends StatefulWidget {
  
    createState()
    {
       return new LBConnectAppState();
     }
  
     } 
  
     class LBConnectAppState extends State&lt;LBConnectApp&gt; with Validation
     {
  
        final formKey = GlobalKey&lt;FormState&gt;();
        String emailAddress = '';
        String passWord = '';
        Widget build(context) {
        return MaterialApp(
  
         title: "LB Connect",
          home: Scaffold(
          backgroundColor: const Color(0xFF0099a9),
          body:
          Container(
          margin: EdgeInsets.all(25.0),
          child: Form(
          key: formKey,
          child: Column(
           children: [
            Container(
              margin: EdgeInsets.only(top: 100.0),
              child:Image.asset('images/lb_connect_trans.png')
             ),
             emailField(),
             passwordField(),   
            submitButton(),
          ],
           ),      
          ),
         )
         ),  
         );  
         }
  
         Widget emailField()
         {
           return TextFormField(
           keyboardType: TextInputType.emailAddress,
            decoration : InputDecoration(
             labelText: 'Email Address',
           ),
  
           validator: validateEmail,
           onSaved: (String value){
  
             emailAddress = value;
  
           },
  
         );
         }
  
         Widget passwordField()
         {
             return TextFormField(
           obscureText: true,
           decoration : InputDecoration(
             labelText: 'Password',
  
           ),
  
           validator: validatePassword,
            onSaved: (String value){
  
              passWord = value;
           },
  
           );
         }
  
         Widget submitButton()
        {
            return Container(
          margin: EdgeInsets.all(10.0),
          child:RaisedButton(
          child: Text('LOGIN'),
          onPressed: (){
            if(formKey.currentState.validate()){
  
              formKey.currentState.save();
               print('Time to save $emailAddress and $passWord to my API');
               Navigator.push(
                 context,
                        new MaterialPageRoute(
                       builder: (BuildContext context) =&gt;
                       new Home()));
  
                    }
                 },
  
              )
         );
       }
  
      }
  </code></pre>