feat: slide window logic
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'src/views/rutas.dart';
|
||||
import 'src/views/main_screen.dart'; // Importar la pantalla principal
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
@@ -13,6 +14,10 @@ class MyApp extends StatelessWidget {
|
||||
return MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Hackaton App',
|
||||
theme: ThemeData(
|
||||
fontFamily: 'Roboto',
|
||||
scaffoldBackgroundColor: colorAzul,
|
||||
),
|
||||
home: const RegistroView(),
|
||||
);
|
||||
}
|
||||
@@ -54,7 +59,11 @@ class RegistroView extends StatelessWidget {
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15))
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => const HorariosView()));
|
||||
// ✅ Navegar a la pantalla principal con todas las vistas
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const MainScreen()),
|
||||
);
|
||||
},
|
||||
child: const Text('Registrar', style: TextStyle(color: Colors.white, fontSize: 18)),
|
||||
),
|
||||
@@ -64,7 +73,14 @@ class RegistroView extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 15),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15))
|
||||
),
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
// TODO: Implementar inicio de sesión
|
||||
// Por ahora también navega a MainScreen
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const MainScreen()),
|
||||
);
|
||||
},
|
||||
child: const Text('Iniciar Sesion', style: TextStyle(color: Colors.white, fontSize: 18)),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user