Skip to content

Instantly share code, notes, and snippets.

@paulallies
Created April 21, 2020 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulallies/6776d4e7a540fa1af1c5c34b0ec1b06e to your computer and use it in GitHub Desktop.
Save paulallies/6776d4e7a540fa1af1c5c34b0ec1b06e to your computer and use it in GitHub Desktop.
Login Page for FB Auth
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