From 868ac401d5e0a45d6b66bea813dda4241d93dbcc Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 20 Nov 2023 13:45:39 +0200 Subject: Added login and routes page --- lib/login.dart | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'lib/login.dart') diff --git a/lib/login.dart b/lib/login.dart index e69de29..cae97a3 100644 --- a/lib/login.dart +++ b/lib/login.dart @@ -0,0 +1,48 @@ +import 'package:flutter/material.dart'; + +class LoginPage extends StatelessWidget { + final TextEditingController emailController = TextEditingController(); + final TextEditingController passwordController = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text('Login')), + body: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextField( + controller: emailController, + keyboardType: TextInputType.emailAddress, + decoration: InputDecoration( + labelText: 'Email', + border: OutlineInputBorder(), + ), + ), + SizedBox(height: 12.0), + TextField( + controller: passwordController, + obscureText: true, + decoration: InputDecoration( + labelText: 'Password', + border: OutlineInputBorder(), + ), + ), + SizedBox(height: 20.0), + ElevatedButton( + onPressed: () { + // Perform the login action here + // For now, let's just print the credentials + print('Email: ${emailController.text.trim()}'); + print('Password: ${passwordController.text.trim()}'); + }, + child: Text('Login'), + ), + ], + ), + ), + ); + } +} -- cgit v1.2.3