Created
June 30, 2020 10:11
-
-
Save loicgeek/97e5c522425297b8fef9ed72db785588 to your computer and use it in GitHub Desktop.
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: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