import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:sf_app_platform/payments/view/screens/core/dashboard_screen.dart'; import 'package:sf_app_platform/payments/view/screens/loading_google_screen.dart'; import 'package:sf_app_platform/payments/view/screens/restore_password/restore_password_screen.dart'; import 'package:sf_app_platform/payments/view/screens/signup/signup_screen.dart'; class LoginScreen extends StatefulWidget { @override State createState() => LoginScreenState(); } class LoginScreenState extends State{ bool passwordVisible = false; @override void initState(){ super.initState(); passwordVisible = true; } @override Widget build(BuildContext context) { 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),), TextField( decoration: InputDecoration( hintText: "Nombre de usuario", labelText: "Nombre de usuario", border: OutlineInputBorder(), ), ), TextField( obscureText: passwordVisible, enableSuggestions: false, autocorrect: false, decoration: InputDecoration( labelText: "Contraseña", hintText: "********", border: OutlineInputBorder(), suffixIcon: IconButton( icon: Icon(passwordVisible ? Icons.visibility : Icons.visibility_off), onPressed: () { setState(() { passwordVisible = !passwordVisible; }); }, ), ) ), TextButton( onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>RestorePasswordScreen())), child: Text("¿Has olvidado la contraseña?") ), FilledButton( onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (_)=>DashboardScreen())), 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") ) ], ), ), )), ); } }