diff --git a/sabitou_clients/assets/images/ball.jpeg b/sabitou_clients/assets/images/ball.jpeg new file mode 100644 index 0000000..b6825fd Binary files /dev/null and b/sabitou_clients/assets/images/ball.jpeg differ diff --git a/sabitou_clients/assets/images/fayeed_logo.png b/sabitou_clients/assets/images/fayeed_logo.png new file mode 100644 index 0000000..3175675 Binary files /dev/null and b/sabitou_clients/assets/images/fayeed_logo.png differ diff --git a/sabitou_clients/assets/images/fayeed_logo.svg b/sabitou_clients/assets/images/fayeed_logo.svg new file mode 100644 index 0000000..3fe0011 --- /dev/null +++ b/sabitou_clients/assets/images/fayeed_logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sabitou_clients/assets/images/relief_radar.png b/sabitou_clients/assets/images/relief_radar.png new file mode 100644 index 0000000..de05774 Binary files /dev/null and b/sabitou_clients/assets/images/relief_radar.png differ diff --git a/sabitou_clients/lib/main.dart b/sabitou_clients/lib/main.dart index 368d659..1179969 100644 --- a/sabitou_clients/lib/main.dart +++ b/sabitou_clients/lib/main.dart @@ -4,6 +4,8 @@ import 'package:flutter_web_plugins/flutter_web_plugins.dart'; import 'package:get/get.dart'; import 'package:get_storage/get_storage.dart'; +import 'screens/login_screen.dart'; +import 'screens/signup_screen.dart'; import 'routes/app_routes.dart'; import 'services/internationalization/app_translations.dart'; import 'services/internationalization/internationalization.dart'; @@ -27,6 +29,8 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return GetMaterialApp( + debugShowCheckedModeBanner: false, + initialBinding: AppBinding(), translations: AppTranslations(), supportedLocales: AppInternationalizationService.supportedLocales, locale: Get.deviceLocale, @@ -37,6 +41,8 @@ class MyApp extends StatelessWidget { GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ], + + home: const Login(), darkTheme: Themes.darkTheme.toTheme, theme: Themes.lightTheme.toTheme, themeMode: AppThemeService.to.themeMode, diff --git a/sabitou_clients/lib/screens/login_screen.dart b/sabitou_clients/lib/screens/login_screen.dart new file mode 100644 index 0000000..a875713 --- /dev/null +++ b/sabitou_clients/lib/screens/login_screen.dart @@ -0,0 +1,149 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; + +import 'signup_screen.dart'; + +class Login extends StatefulWidget { + const Login({super.key}); + + @override + State createState() => _LoginState(); +} + +class _LoginState extends State { + final TextEditingController emailController = TextEditingController(); + final TextEditingController passwordController = TextEditingController(); + + void signUp() { + String Email = emailController.text; + String Password = passwordController.text; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.black, + body: Center( + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/fayeed_logo.png', + fit: BoxFit.cover, + ), + ], + ), + ), + Center( + child: Container( + padding: + const EdgeInsets.symmetric(horizontal: 60, vertical: 24), + width: 400, + height: 420, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(5), + ), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + const Column( + children: [ + Text( + 'Fayeed Electronics', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 25, + fontWeight: FontWeight.bold, + ), + ), + Text( + 'Login with your registered credentials', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.normal, + ), + ) + ], + ), + const SizedBox(height: 24), + TextField( + controller: emailController, + decoration: const InputDecoration( + hintText: 'Email Address', + border: OutlineInputBorder(), + ), + ), + const SizedBox(height: 16), + TextField( + controller: passwordController, + decoration: const InputDecoration( + hintText: 'Password', + border: OutlineInputBorder(), + ), + obscureText: true, + ), + const SizedBox(height: 16), + const Text('Forgot Password?'), + const SizedBox(height: 25), + ElevatedButton( + onPressed: () { + signUp(); + }, + style: ElevatedButton.styleFrom( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5), + ), + padding: const EdgeInsets.symmetric(vertical: 20), + backgroundColor: Colors.orange), + child: const Text( + 'Login', + style: TextStyle( + color: Colors.white, + ), + ), + ), + const SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text('Not yet a member?'), + const SizedBox(width: 8), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const SignUp(), + ), + ); + }, + child: const Text( + 'Signup now', + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + ], + ), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/sabitou_clients/lib/screens/signup_screen.dart b/sabitou_clients/lib/screens/signup_screen.dart new file mode 100644 index 0000000..73bd35a --- /dev/null +++ b/sabitou_clients/lib/screens/signup_screen.dart @@ -0,0 +1,161 @@ +import 'package:flutter/material.dart'; + +import 'login_screen.dart'; + +class SignUp extends StatefulWidget { + const SignUp({super.key}); + + @override + State createState() => _SignUpState(); +} + +class _SignUpState extends State { + final TextEditingController usernameController = TextEditingController(); + final TextEditingController emailController = TextEditingController(); + final TextEditingController passwordController = TextEditingController(); + final TextEditingController confirmPasswordController = + TextEditingController(); + + void login() { + String Email = emailController.text; + String Password = passwordController.text; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.black, + body: Center( + child: Stack( + children: [ + Container( + width: double.infinity, + height: double.infinity, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/fayeed_logo.png', + fit: BoxFit.cover, + ), + ], + ), + ), + Center( + child: Container( + padding: + const EdgeInsets.symmetric(horizontal: 60, vertical: 24), + + width: 475, + height: 490, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(5), + ), + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + const Text( + 'Sign Up', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 38, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 24), + // Input Field 1 + TextField( + controller: usernameController, + decoration: const InputDecoration( + hintText: 'Username', + border: OutlineInputBorder(), + ), + ), + const SizedBox(height: 16), + // Input Field 2 + TextField( + controller: emailController, + decoration: const InputDecoration( + hintText: 'Email Address', + border: OutlineInputBorder(), + ), + ), + const SizedBox(height: 16), + + TextField( + controller: passwordController, + decoration: const InputDecoration( + hintText: 'Password', + border: OutlineInputBorder(), + ), + obscureText: true, + ), + const SizedBox(height: 16), + + TextField( + controller: confirmPasswordController, + decoration: const InputDecoration( + hintText: 'Confirm password', + border: OutlineInputBorder(), + ), + obscureText: true, + ), + const SizedBox(height: 40), + + ElevatedButton( + onPressed: () { + login(); + }, + style: ElevatedButton.styleFrom( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5), + ), + padding: const EdgeInsets.symmetric(vertical: 20), + backgroundColor: Colors.orange), + child: const Text( + 'Sign Up', + style: TextStyle( + color: Colors.white, + ), + ), + ), + const SizedBox(height: 16), + + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text('Already a member?'), + const SizedBox(width: 8), + GestureDetector( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const Login(), + ), + ); + }, + child: const Text( + 'Login here', + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.bold, + ), + ), + ), + ], + ), + ], + ), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/sabitou_clients/pubspec.yaml b/sabitou_clients/pubspec.yaml index f3fd5cf..7b8e657 100644 --- a/sabitou_clients/pubspec.yaml +++ b/sabitou_clients/pubspec.yaml @@ -91,8 +91,10 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - assets/images/ + # - images/a_dot_ham.jpeg - assets/icons/ + # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/to/resolution-aware-images