import 'package:auth/src/login/presentation/loading_google_screen.dart'; import 'package:auth/src/sign_up/signup_screen.dart'; import 'package:design_system/design_system.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:navigation/navigation.dart'; class LoginScreen extends ConsumerWidget { final NavigationContract navigationContract; const LoginScreen({super.key, required this.navigationContract}); @override Widget build(BuildContext context, WidgetRef ref) { bool passwordVisible = true; return Scaffold( body: Expanded( child: Center( child: Container( margin: EdgeInsets.all(30), child: Column( spacing: 10, children: [ Icon(Icons.check, color: Color(0xFF329e95), size: 50), Text( "¡Te damos la bienvenida!", style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold), ), CustomTextField( hint: "Nombre de usuario", label: "Nombre de usuario", ), CustomTextField( showPassword: passwordVisible, label: "Contraseña", hint: "********" ), TextButton( onPressed: () => navigationContract.pushTo('/recover_password'), child: Text("¿Has olvidado la contraseña?"), ), FilledButton( onPressed: () => navigationContract.pushTo('/main/home'), child: Text("Iniciar sesión"), ), Stack(children: [Divider(), Text("o continúa con")]), Row( spacing: 20, children: [ OutlinedButton( onPressed: () => Navigator.push( context, MaterialPageRoute( builder: (_) => LoadingGoogleScreen(), ), ), child: Text("Google", semanticsLabel: "Google"), ), OutlinedButton( onPressed: () => {}, child: Icon(Icons.apple, semanticLabel: "Apple"), ), ], ), Text("¿No tienes cuenta?"), TextButton( onPressed: () => Navigator.push( context, MaterialPageRoute(builder: (_) => SignupScreen()), ), child: Text("Crear una ahora"), ), ], ), ), ), ), ); } }