Actividad interfaz de usuario Login

parent 24fadfa6
......@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
title: 'Practica Flutter',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
......@@ -25,21 +25,3 @@ class MyApp extends StatelessWidget {
}
}
class MyWidget extends StatelessWidget {
const MyWidget({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar( // Barra que se encuentra en la parte superior
title: Text("Prueba flutter estamo en el main "), // Agregar titulo en appBar
backgroundColor: Colors.lightBlue, // Agregar color en la appBar
actions: const [ // Agregar iconos
Icon(Icons.search),
Icon(Icons.menu)
],
),
body: Column(children: []), // Va a tener varios hijos
);
}
}
import 'package:flutter/material.dart';
class LoginPage extends StatelessWidget {
class LoginPage extends StatefulWidget {
const LoginPage({Key? key}) : super(key: key);
@override
_LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Estoy en Login'),
backgroundColor: Colors.lightBlue, // Agregar color en la appBar
actions: const [ // Agregar iconos
title: const Text('Iniciar sesión'),
backgroundColor: Colors.lightBlue,
actions: const [
Icon(Icons.search),
Icon(Icons.menu),
],
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset('assets/img/logo_visorus.jpg'),
const SizedBox(height: 20),
//Campo de Usuario
TextField(
decoration: const InputDecoration(
labelText: 'Usuario',
border: OutlineInputBorder(),
),
),
const SizedBox(height: 20),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Agrega la imagen local
Image.asset('assets/img/logo_visorus.jpg',height: 100),
// Botón para navegar a la página 'homeSeller'
ElevatedButton(
onPressed: () {
// Navega a la página 'homeSeller' cuando se presiona el botón.
Navigator.pushNamed(context, 'homeSeller');
},
child: const Text('Avanzar a Home'),
),
],
//Campo de contraseña
TextField(
decoration: const InputDecoration(
labelText: 'Contraseña',
border: OutlineInputBorder(),
),
obscureText: true,
),
const SizedBox(height: 20),
ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, 'homeSeller');
},
child: const Text('Acceder'),
),
],
),
),
),
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment