我试图将我的项目从Java / Android工作室移动到颤动,但当我尝试更改“活动”时,我有一个口吃/滞后问题...

一旦我按下“注册”按钮,我想转换到注册屏幕,但是当我这样做时,会有一个口吃,动画从屏幕中间开始 . 当我使用后退按钮导航回来时也是如此 .

我昨天开始学习扑动,所以如果你有任何关于如何改进我的布局的提示,那也会有很多帮助! :)

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      routes: <String, WidgetBuilder>{
        "/SignUp": (BuildContext context) => new SignUp()
      },
        home: new Scaffold(
          body: new WelcomePage(),
        )
    );
  }
}

class WelcomePage extends StatelessWidget{
  @override
  Widget build (BuildContext context){
        return new Container(
          padding: const EdgeInsets.all(32.0),
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              new Row(
                children: <Widget>[
                  new Expanded(
                      child: new Container(
                        height: 60.0,
                        margin: const EdgeInsets.only(right: 5.0),
                        child: new RaisedButton(
                          onPressed: _SignIn,
                          color: Colors.blueAccent,
                          child: const Text('Sign In'),
                          textColor: Colors.white,

                        ),
                      )
                  ),
                  new Expanded(
                      child: new Container(
                        height: 60.0,
                        margin: const EdgeInsets.only(left: 5.0),
                        child: new RaisedButton(
                          onPressed: (){Navigator.of(context).pushNamed("/SignUp");},
                          color: Colors.blueAccent,
                          child: const Text('Sign Up'),
                          textColor: Colors.white,
                        ),
                      )
                  )
                ],
              ),
              new Row(
                children: <Widget>[
                  new Expanded(
                      child: new Container(
                        height: 60.0,
                        margin: const EdgeInsets.only(top: 10.0),
                        child: new RaisedButton(
                          onPressed: _GoogleSignIn,
                          color: Colors.blueAccent,
                          child: const Text('Google Sign In'),
                          textColor: Colors.white,
                        ),
                      )
                  )
                ],
              )
            ],
          ),
        );
  }

  void _signUp(BuildContext context){

  }

  void _signIn(){

  }

  void _googleSignIn(){

  }

}


class SignUp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(title: new Text("SignUp"),),
      body: new Container(
        padding: const EdgeInsets.all(32.0),
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            new Row(
              children: <Widget>[
                new Expanded(
                  child: new Container(
                    child: new TextField(
                      decoration: new InputDecoration(
                        labelText: "Email",
                      ),
                      keyboardType: TextInputType.emailAddress,

                    )
                  )
                )
              ],
            ),
            new Row(
              children: <Widget>[
                new Expanded(
                    child: new Container(
                        child: new TextField(
                          decoration: new InputDecoration(
                            labelText: "Password",
                          ),
                          obscureText: true,
                        )
                    )
                )
              ],
            ),
          ],
        ),
      ),
    );
  }
}