diff --git a/lib/adddestination.dart b/lib/adddestination.dart index 6fd8862..df27e26 100644 --- a/lib/adddestination.dart +++ b/lib/adddestination.dart @@ -106,7 +106,7 @@ class _AddDestPageState extends State { margin: const EdgeInsets.only(top: 5, bottom: 20.0), child: TextField( controller: destDetailsController, - obscureText: true, + obscureText: false, decoration: InputDecoration( border: OutlineInputBorder(), labelText: 'Details', diff --git a/lib/login.dart b/lib/login.dart index 8f33e76..5e53f21 100644 --- a/lib/login.dart +++ b/lib/login.dart @@ -80,56 +80,70 @@ class _LoginPageState extends State { ), ), ), - RaisedButton( - color: Colors.blue, - child: Text("Log In", - style: TextStyle( - color: Colors.white, - fontSize: 20.0, - ) - ), - onPressed: () async { + Row( + children: [ + Expanded( + flex: 30, + child: Padding( + padding: const EdgeInsets.only(left: 20, right: 10), + child: ElevatedButton( + child: Text("Log In", + style: TextStyle( + color: Colors.white, + fontSize: 20.0, + ) + ), + onPressed: () async { - //Test code to print contents of controllers - // print(emailController.text); - // print(passwordController.text); + //Test code to print contents of controllers + // print(emailController.text); + // print(passwordController.text); - try { - await FirebaseAuth.instance.signInWithEmailAndPassword( - email: emailController.text, - password: passwordController.text - ); - print('Login successful!'); - Navigator.push( - context, - MaterialPageRoute(builder: (context) => DestinationPage(title: 'Saved Destinations')), - ); - } on FirebaseAuthException catch (e) { - print('Login Failed. Error code: ${e.code}'); - print(e.message); - } - }, - ), - RaisedButton( - child: Text("Sign Up", - style: TextStyle( - color: Colors.white, - fontSize: 20.0, - ) + try { + await FirebaseAuth.instance.signInWithEmailAndPassword( + email: emailController.text, + password: passwordController.text + ); + print('Login successful!'); + Navigator.push( + context, + MaterialPageRoute(builder: (context) => DestinationPage(title: 'Saved Destinations')), + ); + } on FirebaseAuthException catch (e) { + print('Login Failed. Error code: ${e.code}'); + print(e.message); + } + }, + ), + ), + ), + Expanded( + flex: 30, + child: Padding( + padding: const EdgeInsets.only(left: 10, right: 20), + child: ElevatedButton( + child: Text("Sign Up", + style: TextStyle( + color: Colors.white, + fontSize: 20.0, + ) + ), + onPressed: () async { + try { + await FirebaseAuth.instance.createUserWithEmailAndPassword( + email: emailController.text, + password: passwordController.text + ); + print('Account created!'); + } on FirebaseAuthException catch (e) { + print('Signup Failed. Error code: ${e.code}'); + print(e.message); + } + } + ), + ), ), - color: Colors.blue, - onPressed: () async { - try { - await FirebaseAuth.instance.createUserWithEmailAndPassword( - email: emailController.text, - password: passwordController.text - ); - print('Account created!'); - } on FirebaseAuthException catch (e) { - print('Signup Failed. Error code: ${e.code}'); - print(e.message); - } - } + ], ), ], ),