Skip to content

Commit

Permalink
Login Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalramdan17 committed Oct 31, 2021
1 parent db61ef6 commit 7224d7a
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 6 deletions.
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -21,10 +21,9 @@ samples, guidance on mobile development, and a full API reference.

# Video Tutorial
- YouTube (Preview) : https://youtu.be/GfA6_JW26gM
- YouTube (Part 1) : https://youtu.be/SqlNko4Q1K0
- YouTube (Part 2) : https://youtu.be/csgJwCec2WI
- Workout Fitness App - Playlist Video : https://youtube.com/playlist?list=PLfoSLwBzaK26zo_RjLv2cnasV7cPywzW_

SUBSRIBE https://bit.ly/3ymJhMh
Take my Flutter Course worth $500 for FREE https://bit.ly/31hxS4R

I hope you liked it, and dont forget to like, subscribe, share this video with your friends, and star the repository on GitHub!

Expand Down
2 changes: 0 additions & 2 deletions lib/core.dart
@@ -1,5 +1,3 @@
// export 'models/xcore.dart';
export 'pages/xcore.dart';
export 'routes/app_pages.dart';
// export 'services/xcore.dart';
export 'shared/xcore.dart';
222 changes: 222 additions & 0 deletions lib/pages/started/login_view.dart
@@ -0,0 +1,222 @@
// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables

import 'package:aqua_workout_lite/core.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class LoginView extends StatelessWidget {
const LoginView({Key key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: kThirdColor,
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
children: [
backgroundImage(),
titleSubtitle(),
],
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
formLogin(),
SizedBox(height: 15),
forgetButton(),
SizedBox(height: 15),
Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextButton(
onPressed: () {},
child: Container(
height: 50,
width: Get.width * 0.7,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: kFirstColor,
),
child: Center(
child: Text(
"Login",
style: TextStyle(
color: Colors.white, fontSize: 20),
),
),
),
),
TextButton(
onPressed: () {},
child: Container(
height: 50,
width: Get.width * 0.7,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: kThirdColor,
border:
Border.all(width: 1, color: kFirstColor)),
child: Center(
child: Text(
"Sign Up",
style: TextStyle(
color: Colors.white, fontSize: 20),
),
),
),
),
],
),
)
],
),
)
],
),
),
);
}

Align forgetButton() {
return Align(
alignment: Alignment.centerRight,
child: TextButton(
onPressed: () {},
child: Text(
"Forgot your password?",
style: TextStyle(color: Colors.white, fontSize: 18),
),
),
);
}

Column formLogin() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Email",
style: TextStyle(color: Color(0xFF707070), fontSize: 18),
),
TextField(
decoration: InputDecoration(
hintText: "faisalramdan.id@gmail.com",
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color(0xFF707070),
),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color(0xFF707070),
),
),
),
),
SizedBox(height: 20),
Text(
"Password",
style: TextStyle(color: Color(0xFF707070), fontSize: 18),
),
TextField(
obscureText: true,
decoration: InputDecoration(
hintText: "*******",
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color(0xFF707070),
),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Color(0xFF707070),
),
),
),
),
],
);
}

Container titleSubtitle() {
return Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
kThirdColor,
Colors.transparent,
]),
),
height: Get.height * 0.55,
width: Get.width,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
child: Column(
children: [
const SizedBox(height: 30),
RichText(
text: const TextSpan(
text: 'HARD\t',
style: TextStyle(
fontFamily: "Bebas",
fontSize: 30,
letterSpacing: 5,
),
children: [
TextSpan(
text: 'ELEMENT',
style: TextStyle(
color: kFirstColor,
),
)
]),
),
const Spacer(),
Align(
alignment: Alignment.centerLeft,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Text(
"Sign In",
style: TextStyle(
fontSize: 40,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Text(
"Train and live the new experience of \nexercising"
" at home",
style: TextStyle(fontSize: 20),
),
],
),
),
],
),
),
);
}

Container backgroundImage() {
return Container(
height: Get.height * 0.55,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/black/12.jpg"),
fit: BoxFit.cover,
),
),
);
}
}
3 changes: 2 additions & 1 deletion lib/pages/started/welcome_view.dart
@@ -1,4 +1,5 @@
import 'package:aqua_workout_lite/core.dart';
import 'package:aqua_workout_lite/routes/app_pages.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

Expand Down Expand Up @@ -80,7 +81,7 @@ class WelcomeView extends StatelessWidget {
),
const SizedBox(height: 10),
TextButton(
onPressed: () {},
onPressed: () => Get.toNamed(Routes.LOGIN),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
Expand Down
1 change: 1 addition & 0 deletions lib/pages/xcore.dart
@@ -1,3 +1,4 @@
// Started
export 'started/welcome_view.dart';
export 'started/about_view.dart';
export 'started/login_view.dart';
4 changes: 4 additions & 0 deletions lib/routes/app_pages.dart
Expand Up @@ -17,5 +17,9 @@ class AppPages {
name: Routes.ABOUT,
page: () => const AboutView(),
),
GetPage(
name: Routes.LOGIN,
page: () => const LoginView(),
),
];
}
1 change: 1 addition & 0 deletions lib/routes/app_routes.dart
Expand Up @@ -6,4 +6,5 @@ abstract class Routes {
// Main Menu Route
static const WELCOME = '/welcome';
static const ABOUT = '/about-you';
static const LOGIN = '/login';
}

0 comments on commit 7224d7a

Please sign in to comment.