login_page.dart 1.65 KB
Newer Older
1 2
import 'package:flutter/material.dart';

3
class LoginPage extends StatelessWidget {
4
  const LoginPage({Key? key}) : super(key: key);
5 6 7 8

  @override
  Widget build(BuildContext context) {
    return Scaffold(
9
      appBar: AppBar(
10 11
        title: const Text('Estoy en Login'),
        backgroundColor: Colors.lightBlue, // Agregar color en la appBar
12
      ),
13 14 15 16 17 18
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Image.asset('assets/img/logo_visorus.jpg', height: 100),
            const SizedBox(height: 20),//Espacio entre la imagen y campo de texto
19

20 21 22
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 80.0), // añado mi margen horizontal
              child: TextField(
23 24 25 26 27
                decoration: const InputDecoration(
                  labelText: 'Usuario',
                  border: OutlineInputBorder(),
                ),
              ),
28 29
            ),
            const SizedBox(height: 20),
30

31 32 33
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 80.0), // Añado mi margen horizontal
              child: TextField(
34 35 36 37 38 39
                decoration: const InputDecoration(
                  labelText: 'Contraseña',
                  border: OutlineInputBorder(),
                ),
                obscureText: true,
              ),
40 41 42
            ),
            const SizedBox(height: 20),

43 44 45 46 47 48
              ElevatedButton(
                onPressed: () {
                  Navigator.pushNamed(context, 'homeSeller');
                },
                child: const Text('Acceder'),
              ),
49
          ],
50 51
        ),
      ),
52 53
    );
  }
54
}
55