From 79fcf0674707314c5c949feb476ab279f7b3e38c Mon Sep 17 00:00:00 2001 From: Giovanna Esmeralda Chavez Espino <79319097+gio-gigi@users.noreply.github.com> Date: Thu, 9 May 2024 11:25:38 -0600 Subject: [PATCH] Se agrega loginDatos a la page register --- fronted/aplicacionrutasturisticas/lib/pages/login.dart | 2 +- fronted/aplicacionrutasturisticas/lib/pages/register.dart | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fronted/aplicacionrutasturisticas/lib/pages/login.dart b/fronted/aplicacionrutasturisticas/lib/pages/login.dart index fd62a7a..f18a097 100644 --- a/fronted/aplicacionrutasturisticas/lib/pages/login.dart +++ b/fronted/aplicacionrutasturisticas/lib/pages/login.dart @@ -81,7 +81,7 @@ class _TextFielEjemploState extends State { corr = correo.text; pass = password.text; print(corr + " " + pass); - + loginDatos(corr, pass); context.goNamed("StartPage"); } diff --git a/fronted/aplicacionrutasturisticas/lib/pages/register.dart b/fronted/aplicacionrutasturisticas/lib/pages/register.dart index 9c380e1..1da3bfe 100644 --- a/fronted/aplicacionrutasturisticas/lib/pages/register.dart +++ b/fronted/aplicacionrutasturisticas/lib/pages/register.dart @@ -7,6 +7,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter/services.dart'; +import 'package:go_router/go_router.dart'; class RegistroPage extends StatefulWidget { const RegistroPage({super.key}); @@ -109,7 +110,7 @@ class RegistroPageState extends State { pass = pasword.text; passc = passwordConfirmed.text; - print("Haaz precionado el boton \n"); + print("Haz presionado el boton \n"); print(nom + " " + ape + @@ -122,9 +123,11 @@ class RegistroPageState extends State { " \n "); if (pass == passc) { - Registro_Datos(nom, ape, ema, pass); + Registro_Datos(nom, ape, ema, pass); + context.goNamed("LoginPage"); } else { print("La contraseƱa es incorrecta"); } + } } -- GitLab