diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-11-20 13:25:53 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-11-20 13:25:53 +0200 |
| commit | a15bf522340de49118b0a88369a6cc892dfee9d0 (patch) | |
| tree | f609e32907d704b1e9980894e4dc79c703cbe476 /lib | |
| download | carpool-a15bf522340de49118b0a88369a6cc892dfee9d0.tar.xz carpool-a15bf522340de49118b0a88369a6cc892dfee9d0.zip | |
Intial commit
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/login.dart | 0 | ||||
| -rw-r--r-- | lib/main.dart | 65 |
2 files changed, 65 insertions, 0 deletions
diff --git a/lib/login.dart b/lib/login.dart new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/login.dart diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..d5f9762 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,65 @@ +import 'package:flutter/material.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Carpool App', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: LoginPage(), + ); + } +} + +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: const EdgeInsets.all(16.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + TextField( + controller: emailController, + keyboardType: TextInputType.emailAddress, + decoration: InputDecoration(labelText: 'Email'), + ), + SizedBox(height: 16.0), + TextField( + controller: passwordController, + obscureText: true, + decoration: InputDecoration(labelText: 'Password'), + ), + SizedBox(height: 32.0), + ElevatedButton( + onPressed: () { + // Handle login button press + // Add your authentication logic here + }, + child: Text('Login'), + ), + SizedBox(height: 16.0), + TextButton( + onPressed: () { + // Navigate to the sign-up page + // Add your navigation logic here + }, + child: Text('Don\'t have an account? Sign up'), + ), + ], + ), + ), + ); + } +} |
