From 4c05db99b5682c546ca7e8e32fd6c2bbfaf16356 Mon Sep 17 00:00:00 2001 From: nayeli92433 Date: Wed, 31 Jul 2024 10:06:08 -0600 Subject: [PATCH] formulario de inicio de sesion y navegar al home --- lib/src/pages/login_page.dart | 48 +++++++++++++++++++++++++++++++++++++++--------- pubspec.yaml | 5 +++++ 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/lib/src/pages/login_page.dart b/lib/src/pages/login_page.dart index e866333..39c3684 100644 --- a/lib/src/pages/login_page.dart +++ b/lib/src/pages/login_page.dart @@ -6,15 +6,45 @@ class LoginPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: const Text('Login Page'), - ), - body: Center( - child: ElevatedButton( - onPressed: () { - Navigator.pushNamed(context, 'home'); - }, - child: const Text('Hola login_page'), + + body: Padding( + padding: const EdgeInsets.all(16.0), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // Logo + Image.asset( + 'assets/img/logo_visorus.jpg', + height: 100, + ), + const SizedBox(height: 20), + // Campo de texto para usuario + TextField( + decoration: const InputDecoration( + labelText: 'Usuario', + border: OutlineInputBorder(), + ), + ), + const SizedBox(height: 20), + // Campo de texto para contraseña + TextField( + obscureText: true, + decoration: const InputDecoration( + labelText: 'Contraseña', + border: OutlineInputBorder(), + ), + ), + const SizedBox(height: 20), + // Botón de "Acceder" + ElevatedButton( + onPressed: () { + Navigator.pushNamed(context, 'home'); + }, + child: const Text('Acceder'), + ), + ], + ), ), ), ); diff --git a/pubspec.yaml b/pubspec.yaml index 2ab1d9b..b3d3ec6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -58,6 +58,7 @@ flutter: # the material Icons class. uses-material-design: true + # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg @@ -88,3 +89,7 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages + + + assets: + - assets/img/ -- libgit2 0.27.1