如果用户输入正确的数据,那么数据已经在firestore中,那么下一页将会出现,如果不正确,则会给出错误 . 我怎么能这样做?

import'package:flutter / material.dart'; import'dart:async';

import'package:cloud_firestore / cloud_firestore.dart';

void main()=> runApp(new MaterialApp(title:'Registration',home:new Signup(),));

class Signup扩展了StatelessWidget {

字符串一;字符串二;

var用户;

Future onValidate() async {
  //var user;
  DocumentSnapshot snapshot = await

  Firestore.instance.collection("organization").document('').get().then((user));

      String code_A = snapshot['code_A'];
      String code_B = snapshot['code_B'];

}

@override小部件构建(BuildContext context){return Scaffold(appBar:AppBar(title:Text(“Sign up”),),body:new Container(padding:new EdgeInsets.all(20.0),child:new Form(// key:this._formKey,child:new ListView(children:[new TextFormField(keyboardType:TextInputType.number,onSaved:(String value),validator:_validateEmail,decoration:new InputDecoration(labelText:'one' )),

new TextFormField(
                keyboardType: TextInputType.number,
                onSaved: (String value) {
                  two = value;
                },
                validator: _validateEmail,
                decoration: new InputDecoration(
                    labelText: 'two'
                )
            ),

            /*new TextFormField(
                keyboardType: TextInputType.text,
                // Use email input type for emails.
                decoration: new InputDecoration(

                    labelText: 'Mobile number'
                )
            ),*/
            new Container(
              //width: screenSize.width,
              child: new RaisedButton(
                child: new Text(
                  'Sign Up',
                  style: new TextStyle(
                      color: Colors.white
                  ),
                ),

                onPressed: (){
                  if
                  }


                //color: Colors.blue,
              ),
              margin: new EdgeInsets.only(
                  top: 20.0
              ),
            )
          ],
        ),
      )
  ),
);

}}