Created
April 21, 2020 14:06
-
-
Save paulallies/6776d4e7a540fa1af1c5c34b0ec1b06e to your computer and use it in GitHub Desktop.
Login Page for FB Auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
class Login extends StatelessWidget { | |
TextEditingController emailController = TextEditingController(); | |
TextEditingController passwordController = TextEditingController(); | |
_login() { | |
print(emailController.text); | |
print(passwordController.text); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text("Login"), | |
), | |
body: Center( | |
child: Column( | |
children: <Widget>[ | |
TextField( | |
controller: emailController, | |
decoration: InputDecoration(hintText: "Email"), | |
), | |
TextField( | |
controller: passwordController, | |
decoration: InputDecoration(hintText: "Password"), | |
), | |
FlatButton(onPressed: _login, child: Text("Login")) | |
], | |
)), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment