import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; <<<<<<< HEAD import 'custome_widget/custome_login_register_textformfield.dart'; ======= import 'custome_widget/custome_login_register_textformfield.dart'; >>>>>>> 3cd6ac3a4921e278efc30581ae7dab4ce2deae3e void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, title: "Noor app separeted componts", theme: ThemeData( <<<<<<< HEAD accentColor: Colors.red[100], scaffoldBackgroundColor: Color(0xffededed), primaryColor: Colors.lightBlue), home: _AuthTest(), ======= accentColor: Colors.green[100], scaffoldBackgroundColor: Color(0xffededed), primaryColor: Colors.lightBlue), home:_AuthTest(), >>>>>>> 3cd6ac3a4921e278efc30581ae7dab4ce2deae3e ); } } class _AuthTest extends StatefulWidget { @override __AuthTestState createState() => __AuthTestState(); } class __AuthTestState extends State<_AuthTest> { <<<<<<< HEAD static String id = 'SignUpScreen'; final GlobalKey _globalKey = GlobalKey(); String email, password, firstName, lastName; ======= static String id='SignUpScreen'; final GlobalKey_globalKey=GlobalKey(); String email,password,firstName,lastName; >>>>>>> 3cd6ac3a4921e278efc30581ae7dab4ce2deae3e @override Widget build(BuildContext context) { return Scaffold( <<<<<<< HEAD body: Form( key: _globalKey, child: ListView( children: [ SizedBox( height: MediaQuery.of(context).size.height * 0.08, ), CustomTextField( iconT: Icons.person, hint: 'Enter Your First Name', obs: false, typeInd: 1, onClick: (value) { firstName = value; }, ), SizedBox( height: MediaQuery.of(context).size.height * 0.015, ), CustomTextField( iconT: Icons.person, hint: 'Enter Your Last Name', obs: false, typeInd: 1, onClick: (value) { lastName = value; }), SizedBox( height: MediaQuery.of(context).size.height * 0.015, ), CustomTextField( iconT: Icons.email, hint: 'Enter Your New Email', obs: false, typeInd: 0, onClick: (value) { email = value; }), SizedBox( height: MediaQuery.of(context).size.height * 0.015, ), CustomTextField( iconT: Icons.lock_open, hint: 'Enter Your New Password', obs: false, typeInd: 1, ), SizedBox( height: MediaQuery.of(context).size.height * 0.015, ), CustomTextField( iconT: Icons.lock_open, hint: 'Confirm your New Password', obs: false, typeInd: 1, onClick: (value) { password = value; }), SizedBox( height: MediaQuery.of(context).size.height * 0.015, ), Padding( padding: EdgeInsets.symmetric( horizontal: MediaQuery.of(context).size.width * 0.3), child: Builder( builder: (context) => FlatButton( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20), ), onPressed: () async { if (_globalKey.currentState.validate()) { _globalKey.currentState.save(); try { print(email); print(password); // Navigator.pushNamed(context, MainUserScreen.id); } catch (e) { Scaffold.of(context).showSnackBar( SnackBar( content: Text(e.message), ), ); } } }, color: Colors.black87, child: Text( 'Sign Up', style: TextStyle( fontSize: 16, color: Colors.white, ), ), ), ), ), SizedBox( height: MediaQuery.of(context).size.height * 0.02, ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( 'You already have an account?', style: TextStyle( color: Colors.white, fontSize: 16, ), ), GestureDetector( child: Text( ' Log In Now', style: TextStyle( ======= body: Form( key: _globalKey, child: ListView( children: [ SizedBox( height: MediaQuery.of(context).size.height*0.08, ), CustomTextField(iconT: Icons.person,hint: 'Enter Your First Name',obs: false,typeInd:1, onClick: (value){firstName=value; },), SizedBox( height: MediaQuery.of(context).size.height*0.015, ), CustomTextField(iconT: Icons.person,hint: 'Enter Your Last Name',obs: false,typeInd:1, onClick: (value){lastName=value; }), SizedBox( height: MediaQuery.of(context).size.height*0.015, ), CustomTextField(iconT: Icons.email,hint: 'Enter Your New Email',obs: false,typeInd:0, onClick: (value){email=value; }), SizedBox( height: MediaQuery.of(context).size.height*0.015, ), CustomTextField(iconT: Icons.lock_open,hint: 'Enter Your New Password',obs: false,typeInd:1, ), SizedBox( height: MediaQuery.of(context).size.height*0.015, ), CustomTextField(iconT: Icons.lock_open,hint: 'Confirm your New Password',obs: false,typeInd:1, onClick: (value){password=value; }), SizedBox( height: MediaQuery.of(context).size.height*0.015, ), Padding( padding: EdgeInsets.symmetric(horizontal: MediaQuery.of(context).size.width*0.3), child: Builder( builder:(context)=> FlatButton( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(20), ), onPressed: ()async { if( _globalKey.currentState.validate()) { _globalKey.currentState.save(); try { print(email); print(password); // Navigator.pushNamed(context, MainUserScreen.id); } catch(e){ Scaffold.of(context).showSnackBar(SnackBar( content: Text( e.message ), ),); } } }, color: Colors.black87, child: Text('Sign Up',style: TextStyle( fontSize: 16, color: Colors.white, ),), ), ), ), SizedBox( height: MediaQuery.of(context).size.height*0.02, ), Row( mainAxisAlignment: MainAxisAlignment.center , children: [ Text('You already have an account?',style: TextStyle( color: Colors.white, fontSize: 16, ),), GestureDetector( child: Text( ' Log In Now',style: TextStyle( >>>>>>> 3cd6ac3a4921e278efc30581ae7dab4ce2deae3e fontSize: 16, color: Colors.black87, fontWeight: FontWeight.bold, decoration: TextDecoration.underline, <<<<<<< HEAD ), ), onTap: () { //Navigator.pushNamed(context, LoginScreen.id); }, ) ], ), ], ), ), ); } } ======= ),), onTap: (){ //Navigator.pushNamed(context, LoginScreen.id); }, ) ],), ],), ), ); } } >>>>>>> 3cd6ac3a4921e278efc30581ae7dab4ce2deae3e