Actividad interfaz de usuario Login

parent 24fadfa6
...@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget { ...@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
title: 'Flutter Demo', title: 'Practica Flutter',
theme: ThemeData( theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true, useMaterial3: true,
...@@ -25,21 +25,3 @@ class MyApp extends StatelessWidget { ...@@ -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'; import 'package:flutter/material.dart';
class LoginPage extends StatelessWidget { class LoginPage extends StatefulWidget {
const LoginPage({Key? key}) : super(key: key); const LoginPage({Key? key}) : super(key: key);
@override @override
_LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
@override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('Estoy en Login'), title: const Text('Iniciar sesión'),
backgroundColor: Colors.lightBlue, // Agregar color en la appBar backgroundColor: Colors.lightBlue,
actions: const [ // Agregar iconos actions: const [
Icon(Icons.search), Icon(Icons.search),
Icon(Icons.menu), Icon(Icons.menu),
], ],
), ),
body: Padding(
body: Center( padding: const EdgeInsets.all(16.0),
child: Center(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
// Agrega la imagen local Image.asset('assets/img/logo_visorus.jpg'),
Image.asset('assets/img/logo_visorus.jpg',height: 100), const SizedBox(height: 20),
// Botón para navegar a la página 'homeSeller'
//Campo de Usuario
TextField(
decoration: const InputDecoration(
labelText: 'Usuario',
border: OutlineInputBorder(),
),
),
const SizedBox(height: 20),
//Campo de contraseña
TextField(
decoration: const InputDecoration(
labelText: 'Contraseña',
border: OutlineInputBorder(),
),
obscureText: true,
),
const SizedBox(height: 20),
ElevatedButton( ElevatedButton(
onPressed: () { onPressed: () {
// Navega a la página 'homeSeller' cuando se presiona el botón.
Navigator.pushNamed(context, 'homeSeller'); Navigator.pushNamed(context, 'homeSeller');
}, },
child: const Text('Avanzar a Home'), 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