update
This commit is contained in:
@@ -1,18 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:prosappco/main.dart';
|
||||
import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
import 'package:prosappco/src/components/primary_btn.dart';
|
||||
import 'package:prosappco/src/controllers/login_email_controller.dart';
|
||||
import 'package:prosappco/src/controllers/register_controller.dart';
|
||||
import 'package:prosappco/src/screens/login.dart';
|
||||
import 'package:prosappco/src/screens/welcome.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'package:firebase_auth/firebase_auth.dart';
|
||||
import 'package:google_sign_in/google_sign_in.dart';
|
||||
import 'package:prosappco/src/screens/register.dart';
|
||||
|
||||
class LoginEmailScreen extends StatefulWidget {
|
||||
const LoginEmailScreen({super.key});
|
||||
@@ -30,7 +21,7 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
backgroundColor: Color(0xFFD6F4FF),
|
||||
backgroundColor: const Color(0xFFD6F4FF),
|
||||
body: SingleChildScrollView(
|
||||
reverse: true,
|
||||
child: Stack(
|
||||
@@ -62,7 +53,7 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
icon: const Icon(
|
||||
Icons.arrow_back,
|
||||
size: 30,
|
||||
),
|
||||
@@ -70,7 +61,7 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
Text(
|
||||
const Text(
|
||||
'Iniciar sesión',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF262626),
|
||||
@@ -90,23 +81,23 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
margin: const EdgeInsets.only(top: 210, left: 50, right: 50),
|
||||
child: Column(children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 20),
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
await AuthenticationRepository.instance
|
||||
.signInWithGoogle();
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Color(0xFF2BA4EC),
|
||||
backgroundColor: const Color(0xFF2BA4EC),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
elevation: 0,
|
||||
minimumSize: Size(230, 60),
|
||||
minimumSize: const Size(230, 60),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: const [
|
||||
Text(
|
||||
'Entrar con Google ',
|
||||
style: TextStyle(
|
||||
@@ -121,9 +112,9 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5),
|
||||
padding: const EdgeInsets.symmetric(vertical: 5),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
children: const [
|
||||
Expanded(
|
||||
child: Divider(
|
||||
color: Colors.black38,
|
||||
@@ -152,10 +143,10 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
fontSize: 18.0, color: Color(0xFF65676B))),
|
||||
)),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 20),
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: TextFormField(
|
||||
controller: controller.email,
|
||||
decoration: InputDecoration(
|
||||
decoration: const InputDecoration(
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Color(0xFFECECEC)),
|
||||
borderRadius: BorderRadius.all(
|
||||
@@ -173,7 +164,7 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(bottom: 5),
|
||||
child: Align(
|
||||
alignment: Alignment.topLeft,
|
||||
@@ -182,25 +173,25 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
fontSize: 18.0, color: Color(0xFF65676B))),
|
||||
)),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 50),
|
||||
padding: const EdgeInsets.only(bottom: 50),
|
||||
child: TextFormField(
|
||||
controller: controller.password,
|
||||
obscureText: _obscureText,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder: OutlineInputBorder(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Color(0xFFECECEC)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(50),
|
||||
)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Color(0xFFECECEC)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(50),
|
||||
)),
|
||||
hintText: 'Contraseña',
|
||||
fillColor: Color.fromARGB(255, 239, 239, 239),
|
||||
fillColor: const Color.fromARGB(255, 239, 239, 239),
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.lock_outline),
|
||||
prefixIcon: const Icon(Icons.lock_outline),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(
|
||||
_obscureText
|
||||
@@ -234,20 +225,20 @@ class _LoginEmailScreenState extends State<LoginEmailScreen> {
|
||||
),
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 16.0,
|
||||
color: Color(0xFF65676B),
|
||||
fontFamily: 'Poppins',
|
||||
),
|
||||
children: [
|
||||
TextSpan(text: 'No estas registrado? '),
|
||||
const TextSpan(text: 'No estas registrado? '),
|
||||
WidgetSpan(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushReplacementNamed(
|
||||
context, '/register');
|
||||
},
|
||||
child: Text(
|
||||
child: const Text(
|
||||
'Registrarse',
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
|
||||
Reference in New Issue
Block a user