Skip to content

Commit

Permalink
go server ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Khattar committed Nov 27, 2023
1 parent 6d8aac1 commit abae76e
Show file tree
Hide file tree
Showing 24 changed files with 940 additions and 289 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ app.*.map.json
/android/app/profile
/android/app/release

/server/constant/const.go
/server/.env
/lib/global/baseurl.dart
2 changes: 1 addition & 1 deletion lib/global/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';

const Color klightBlue = Color(0xFFEAF7FF);
const Color kdarkBlue = Color(0xFF488BB7);
const Color kdarkBlueMuted = Color(0xFF5495C2);
Color kdarkBlueMuted = Color(0xFF5495C2).withOpacity(0.7);
const Color kpurple = Color(0xFF9B7CF5);
const Color klightPurple = Color(0xFF9797D3);
const Color kyellow = Color(0xFFF2C634);
Expand Down
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class MyApp extends StatelessWidget {
// Camera.routeName: (context) => Camera(),
// SpecificNeeds.routeName: (context) => SpecificNeeds(),
},
home: NavScreen(),
home: WelcomeScreen(),
);
}
}
48 changes: 24 additions & 24 deletions lib/screens/auth/auth_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -175,30 +175,30 @@ class _AuthScreenState extends State<AuthScreen> with TickerProviderStateMixin {
],
),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: GestureDetector(
onTap: () {},
child: Container(
width: double.infinity,
height: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(16),
color: Colors.white,
),
child: const Center(
child: Text(
"Log In with Google",
style: TextStyle(),
),
),
),
),
),
const SizedBox(
height: 40,
),
// Padding(
// padding: const EdgeInsets.symmetric(horizontal: 24),
// child: GestureDetector(
// onTap: () {},
// child: Container(
// width: double.infinity,
// height: 50,
// decoration: BoxDecoration(
// border: Border.all(color: Colors.black),
// borderRadius: BorderRadius.circular(16),
// color: Colors.white,
// ),
// child: const Center(
// child: Text(
// "Log In with Google",
// style: TextStyle(),
// ),
// ),
// ),
// ),
// ),
// const SizedBox(
// height: 40,
// ),
],
),
);
Expand Down
1 change: 1 addition & 0 deletions lib/screens/auth/signup_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class Signup extends StatelessWidget {
const Spacer(flex: 2),
GestureDetector(
onTap: () {
Navigator.pushNamed(context, '/tabScreen');
AuthServices().postSignUp(
name: nameController.text,
email: emailController.text,
Expand Down
7 changes: 3 additions & 4 deletions lib/screens/home/components/mediatation_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class _MeditationState extends State<Meditation> {
double height = MediaQuery.of(context).size.height;
double width = MediaQuery.of(context).size.width;
return SizedBox(
height: height * 0.25,
height: height * 0.24,
child: PageView.builder(
clipBehavior: Clip.none,
controller: pageController,
Expand All @@ -48,8 +48,7 @@ class _MeditationState extends State<Meditation> {
children: [
Container(
clipBehavior: Clip.none,
margin:
const EdgeInsets.only(left: 8, right: 8, bottom: 24),
margin: const EdgeInsets.only(left: 8, right: 8),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
Expand All @@ -73,7 +72,7 @@ class _MeditationState extends State<Meditation> {
),
),
Positioned(
bottom: 60,
bottom: height * 0.052,
left: 30,
child: Text(
"Meditation ${index + 1}",
Expand Down
36 changes: 36 additions & 0 deletions lib/screens/home/components/yoga_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';

class YogaCard extends StatelessWidget {
const YogaCard({super.key});

@override
Widget build(BuildContext context) {
double height = MediaQuery.of(context).size.height;
double width = MediaQuery.of(context).size.width;
return ListView.builder(
scrollDirection: Axis.vertical,
itemCount: 3,
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return Padding(
padding: const EdgeInsets.only(bottom: 16, left: 24, right: 24),
child: Container(
width: width * 0.8,
height: 80,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.03),
offset: const Offset(8, 20),
blurRadius: 24,
),
],
),
),
);
});
}
}
28 changes: 18 additions & 10 deletions lib/screens/home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import 'package:yogzen/global/color.dart';
import 'package:yogzen/screens/home/components/mediatation_card.dart';
import 'dart:math' as math;

import 'package:yogzen/screens/home/components/yoga_card.dart';

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

Expand Down Expand Up @@ -51,13 +53,14 @@ class _HomeScreenState extends State<HomeScreen> {
height: height * 0.3,
width: width,
decoration: BoxDecoration(
image: DecorationImage(
opacity: 0.3,
image: Image.asset(
"assets/mountain.jpeg",
).image,
fit: BoxFit.cover,
),
// image: DecorationImage(
// opacity: 0.3,
// image: Image.asset(
// "assets/mountain.jpeg",
// ).image,
// fit: BoxFit.cover,
// ),

color: kdarkBlue,
),
child: Column(
Expand Down Expand Up @@ -111,10 +114,9 @@ class _HomeScreenState extends State<HomeScreen> {
clipBehavior: Clip.none,
children: [
Container(

height: height * 0.12,
width: width * 0.8,
decoration: const BoxDecoration(
decoration: BoxDecoration(
color: kdarkBlueMuted,
borderRadius: BorderRadius.only(
topRight: Radius.circular(100),
Expand Down Expand Up @@ -180,12 +182,18 @@ class _HomeScreenState extends State<HomeScreen> {
// meditation

Padding(
padding: const EdgeInsets.only(left: 16, top: 24, bottom: 22),
padding: const EdgeInsets.only(left: 16, top: 24, bottom: 20),
child: Text("Meditation",
style: Theme.of(context).textTheme.headlineMedium),
),

const Meditation(),
Padding(
padding: const EdgeInsets.only(left: 16, bottom: 0),
child: Text("Yoga Library",
style: Theme.of(context).textTheme.headlineMedium),
),
const YogaCard(),
],
),
),
Expand Down
118 changes: 71 additions & 47 deletions lib/screens/welcome/welcome_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,58 +49,82 @@ class _WelcomeScreenState extends State<WelcomeScreen>
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: klightBlue,
body: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Spacer(),
Text(
'Yogzen',
style: TextStyle(
color: kblackHeading,
fontSize: 32,
fontWeight: FontWeight.w600),
),
const SizedBox(
height: 30,
),
Text(
'AI enabled yoga app for all your ',
style: TextStyle(color: kblackSubHeading),
),
Text(
'yogic needs!',
style: TextStyle(color: kblackSubHeading),
),
Spacer(),
AnimatedContainer(
body: Container(
decoration: BoxDecoration(
color: Colors.white,
image: DecorationImage(
opacity: 0.7,
image: Image.asset(
'assets/meditation/img2.jpeg',
).image,
fit: BoxFit.cover),
),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Spacer(),
Text(
'Yogzen',
style: TextStyle(
color: kblackHeading,
fontSize: 32,
fontWeight: FontWeight.w600),
),
const SizedBox(
height: 30,
),
Text(
'AI enabled yoga app for all your ',
style: TextStyle(color: kblackSubHeading),
),
Text(
'yogic needs!',
style: TextStyle(color: kblackSubHeading),
),
Spacer(),
AnimatedContainer(
duration: Duration(milliseconds: 1500),
transform: Transform.translate(
offset: Offset(0, animation!.value),
).transform,
child: Hero(
tag: "welcome",
child: Image.asset('assets/welcome.png'))),
Spacer(),
ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, "/auth");
},
style: ElevatedButton.styleFrom(
backgroundColor: kdarkBlue,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100))),
child: const Padding(
padding: EdgeInsets.fromLTRB(50, 14, 50, 14),
child: Text('Get Started', style: TextStyle(fontSize: 16)),
tag: "welcome",
child: Container(
child: Image.asset('assets/welcome.png'),
decoration: BoxDecoration(
// boxShadow: [
// BoxShadow(
// color: Colors.black.withOpacity(0.1),
// offset: const Offset(8, 20),
// blurRadius: 24,
// ),
// ],
),
),
),
),
Spacer(),
ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, "/auth");
},
style: ElevatedButton.styleFrom(
backgroundColor: kdarkBlue,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100))),
child: const Padding(
padding: EdgeInsets.fromLTRB(50, 14, 50, 14),
child: Text('Get Started', style: TextStyle(fontSize: 16)),
),
),
const SizedBox(
height: 50,
),
),
const SizedBox(
height: 50,
),
],
)
]));
],
)
]),
));
}
}
7 changes: 7 additions & 0 deletions server/constant/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package constant



const DbName = "Yogzen"
const ColName = "Users"

Loading

0 comments on commit abae76e

Please sign in to comment.