login_page.dart 1.46 KB
Newer Older
nayeli92433 committed
1 2 3 4 5 6 7 8
import 'package:flutter/material.dart';

class LoginPage extends StatelessWidget {
  const LoginPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

      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'),
              ),
            ],
          ),
nayeli92433 committed
48 49 50 51 52
        ),
      ),
    );
  }
}