feat: login window added
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// main.dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'src/views/rutas.dart';
|
||||
import 'src/views/main_screen.dart'; // Importar la pantalla principal
|
||||
import 'src/views/main_screen.dart';
|
||||
import 'src/views/login.dart'; // Importar LoginView
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
@@ -59,7 +61,7 @@ class RegistroView extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15))
|
||||
),
|
||||
onPressed: () {
|
||||
// ✅ Navegar a la pantalla principal con todas las vistas
|
||||
// Navegar a MainScreen (app principal)
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const MainScreen()),
|
||||
@@ -74,14 +76,13 @@ class RegistroView extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15))
|
||||
),
|
||||
onPressed: () {
|
||||
// TODO: Implementar inicio de sesión
|
||||
// Por ahora también navega a MainScreen
|
||||
Navigator.pushReplacement(
|
||||
// Navegar a LoginView
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const MainScreen()),
|
||||
MaterialPageRoute(builder: (context) => const LoginView()),
|
||||
);
|
||||
},
|
||||
child: const Text('Iniciar Sesion', style: TextStyle(color: Colors.white, fontSize: 18)),
|
||||
child: const Text('¿Tienes cuenta?', style: TextStyle(color: Colors.white, fontSize: 18)),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user