Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign up page #25

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added sabitou_clients/assets/images/ball.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sabitou_clients/assets/images/fayeed_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions sabitou_clients/assets/images/fayeed_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sabitou_clients/assets/images/relief_radar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions sabitou_clients/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand All @@ -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,
Expand Down
149 changes: 149 additions & 0 deletions sabitou_clients/lib/screens/login_screen.dart
Original file line number Diff line number Diff line change
@@ -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<Login> createState() => _LoginState();
}

class _LoginState extends State<Login> {
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),

Check failure on line 50 in sabitou_clients/lib/screens/login_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer using const constructor BorderRadius.all.
),
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(

Check failure on line 67 in sabitou_clients/lib/screens/login_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer trailing comma.
'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: () {

Check warning on line 98 in sabitou_clients/lib/screens/login_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer extracting the callback to a separate widget method.
signUp();
},
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),

Check failure on line 103 in sabitou_clients/lib/screens/login_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer using const constructor BorderRadius.all.
),
padding: const EdgeInsets.symmetric(vertical: 20),
backgroundColor: Colors.orange),

Check failure on line 106 in sabitou_clients/lib/screens/login_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer trailing comma.
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: () {

Check warning on line 121 in sabitou_clients/lib/screens/login_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer extracting the callback to a separate widget method.
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const SignUp(),
),
);
},
child: const Text(
'Signup now',
style: TextStyle(
color: Colors.blue,
fontWeight: FontWeight.bold,
),
),
),
],
),
],
),
),
),
),
],
),
),
);
}
}
161 changes: 161 additions & 0 deletions sabitou_clients/lib/screens/signup_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
import 'package:flutter/material.dart';

import 'login_screen.dart';

class SignUp extends StatefulWidget {
const SignUp({super.key});

@override
State<SignUp> createState() => _SignUpState();
}

class _SignUpState extends State<SignUp> {
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),

Check failure on line 53 in sabitou_clients/lib/screens/signup_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer using const constructor BorderRadius.all.
),
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

Check failure on line 69 in sabitou_clients/lib/screens/signup_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer formatting comments like sentences.
TextField(
controller: usernameController,
decoration: const InputDecoration(
hintText: 'Username',
border: OutlineInputBorder(),
),
),
const SizedBox(height: 16),
// Input Field 2

Check failure on line 78 in sabitou_clients/lib/screens/signup_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer formatting comments like sentences.
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: () {

Check warning on line 109 in sabitou_clients/lib/screens/signup_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer extracting the callback to a separate widget method.
login();
},
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),

Check failure on line 114 in sabitou_clients/lib/screens/signup_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer using const constructor BorderRadius.all.
),
padding: const EdgeInsets.symmetric(vertical: 20),
backgroundColor: Colors.orange),

Check failure on line 117 in sabitou_clients/lib/screens/signup_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer trailing comma.
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: () {

Check warning on line 133 in sabitou_clients/lib/screens/signup_screen.dart

View workflow job for this annotation

GitHub Actions / sabitu-client / static-analysis

Prefer extracting the callback to a separate widget method.
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const Login(),
),
);
},
child: const Text(
'Login here',
style: TextStyle(
color: Colors.blue,
fontWeight: FontWeight.bold,
),
),
),
],
),
],
),
),
),
),
],
),
),
);
}
}
2 changes: 2 additions & 0 deletions sabitou_clients/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading