Skip to content

Instantly share code, notes, and snippets.

@loicgeek
Created June 30, 2020 10:11
Show Gist options
  • Save loicgeek/97e5c522425297b8fef9ed72db785588 to your computer and use it in GitHub Desktop.
Save loicgeek/97e5c522425297b8fef9ed72db785588 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:todo_app_getx/auth/auth.controller.dart';
class RegisterPage extends StatelessWidget {
final AuthController authController = AuthController.to;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Register"),
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextField(
controller: authController.emailController,
decoration: InputDecoration(hintText: "Email"),
),
TextField(
controller: authController.passwordController,
decoration: InputDecoration(hintText: "Password"),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
FlatButton(
padding: EdgeInsets.all(8),
color: Colors.blue,
onPressed: () {
authController.handleSignUp();
},
child: Text(
"Sign Up",
style: TextStyle(color: Colors.white),
),
),
],
),
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment