120 lines
4.4 KiB
Dart
120 lines
4.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:gap/gap.dart';
|
|
|
|
class LoginPage extends StatelessWidget {
|
|
const LoginPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
alignment: Alignment.center,
|
|
height: MediaQuery.of(context).size.height,
|
|
decoration: const BoxDecoration(
|
|
gradient: LinearGradient(
|
|
colors: [
|
|
Color.fromRGBO(34, 51, 69, 1),
|
|
Color.fromRGBO(22, 32, 44, 1),
|
|
],
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
),
|
|
),
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
const Gap(120),
|
|
Text('Ofelia Franco-Alcala',
|
|
style: GoogleFonts.outfit(
|
|
textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 16))),
|
|
Text('Pharmacy',
|
|
style: GoogleFonts.outfit(
|
|
textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 32))),
|
|
const Gap(32),
|
|
Text('Login',
|
|
style: GoogleFonts.outfit(
|
|
textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 32))),
|
|
const Gap(16),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 16, right: 16),
|
|
child: Container(
|
|
padding: EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
border: Border.all(color: Colors.white), borderRadius: BorderRadius.all(Radius.circular(16))),
|
|
child: Form(
|
|
child: Column(
|
|
children: [
|
|
TextFormField(
|
|
decoration: InputDecoration(
|
|
labelText: 'Email',
|
|
border: OutlineInputBorder(),
|
|
)),
|
|
const Gap(8),
|
|
TextFormField(
|
|
decoration: InputDecoration(
|
|
labelText: 'Password',
|
|
border: OutlineInputBorder(),
|
|
)),
|
|
const Gap(16),
|
|
TextButton(onPressed: () => {}, child: Text('Login'))
|
|
],
|
|
)),
|
|
),
|
|
),
|
|
|
|
// Form(
|
|
|
|
// child: Column(
|
|
// children: [
|
|
// TextFormField(
|
|
// decoration: InputDecoration(
|
|
// labelText: 'Email',
|
|
// border: OutlineInputBorder(),
|
|
// ),
|
|
// validator: (value) {
|
|
// if (value.isEmpty) {
|
|
// return 'Please enter an email';
|
|
// }
|
|
// return null;
|
|
// },
|
|
// onSaved: (value) => _email = value,
|
|
// ),
|
|
// SizedBox(height: 20),
|
|
// TextFormField(
|
|
// decoration: InputDecoration(
|
|
// labelText: 'Password',
|
|
// border: OutlineInputBorder(),
|
|
// ),
|
|
// obscureText: true,
|
|
// validator: (value) {
|
|
// if (value.isEmpty) {
|
|
// return 'Please enter a password';
|
|
// }
|
|
// return null;
|
|
// },
|
|
// onSaved: (value) => _password = value,
|
|
// ),
|
|
// SizedBox(height: 20),
|
|
// ElevatedButton(
|
|
// onPressed: () {
|
|
// if (_formKey.currentState.validate()) {
|
|
// _formKey.currentState.save();
|
|
// // Login logic here
|
|
// print('Email: $_email, Password: $_password');
|
|
// }
|
|
// },
|
|
// child: Text('Login'),
|
|
// ),
|
|
// ],
|
|
// ),
|
|
// ),
|
|
// )
|
|
// )
|
|
],
|
|
),
|
|
),
|
|
));
|
|
}
|
|
}
|