Skip to content

Commit

Permalink
final commit
Browse files Browse the repository at this point in the history
  • Loading branch information
imhrsit committed Jan 18, 2024
1 parent 190e209 commit e82e8c5
Show file tree
Hide file tree
Showing 26 changed files with 91 additions and 456 deletions.
Binary file removed assets/audio/bird_chirping.mp3
Binary file not shown.
Binary file removed assets/logo.png
Binary file not shown.
Binary file removed assets/mountain.jpeg
Binary file not shown.
Binary file removed assets/profile.png
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/components/chat_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ChatButton extends StatelessWidget {
page: ChatScreen(),
),
),
child: CircleAvatar(
child: const CircleAvatar(
backgroundColor: kdarkBlue,
radius: 32,
child: Icon(
Expand Down
66 changes: 0 additions & 66 deletions lib/components/hexagon.dart

This file was deleted.

85 changes: 0 additions & 85 deletions lib/components/nav_bar.dart

This file was deleted.

7 changes: 3 additions & 4 deletions lib/components/nav_bar_screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:bottom_navy_bar/bottom_navy_bar.dart';
import 'package:flutter/material.dart';
import 'package:yogzen/components/nav_bar.dart';
import 'package:yogzen/global/color.dart';
import 'package:yogzen/screens/home/home_screen.dart';
import 'package:yogzen/screens/specific_needs/specific_needs.dart';
Expand All @@ -16,9 +15,9 @@ class NavScreen extends StatefulWidget {

class _NavScreenState extends State<NavScreen> {
final _pages = [
HomeScreen(),
SpecificNeedsScreen(),
UserProfileScreen(),
const HomeScreen(),
const SpecificNeedsScreen(),
const UserProfileScreen(),
];

var _selected = 0;
Expand Down
70 changes: 3 additions & 67 deletions lib/components/yoga_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class YogaCard extends StatelessWidget {

@override
Widget build(BuildContext context) {
final height = MediaQuery.of(context).size.height;
final width = MediaQuery.of(context).size.width;
return GestureDetector(
onTap: () {
Expand Down Expand Up @@ -45,7 +44,7 @@ class YogaCard extends StatelessWidget {
Positioned(
bottom: 0,
child: Container(
padding: EdgeInsets.only(left: 16, right: 8, top: 16, bottom: 8),
padding: const EdgeInsets.only(left: 16, right: 8, top: 16, bottom: 8),
width: width,
decoration: BoxDecoration(
color: Colors.white,
Expand All @@ -54,7 +53,7 @@ class YogaCard extends StatelessWidget {
Colors.white.withOpacity(0),
Colors.white.withOpacity(0.8),
],
stops: [0, 0.3],
stops: const [0, 0.3],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
Expand Down Expand Up @@ -98,67 +97,4 @@ class YogaCard extends StatelessWidget {
),
);
}
}


// padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
// child: Column(
// children: [
// Expanded(
// child: Image.network(
// yoga.imageUrl,
// ),
// ),
// const SizedBox(
// height: 8,
// ),
// Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// FittedBox(
// fit: BoxFit.scaleDown,
// child: Icon(
// Icons.play_circle_outline_rounded,
// size: 36,
// color: kdarkBlueMuted,
// ),
// ),
// const SizedBox(
// width: 8,
// ),
// FittedBox(
// fit: BoxFit.scaleDown,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// yoga.name,
// style: TextStyle(
// fontWeight: FontWeight.w600,
// fontSize: 16,
// color: kblackHeading),
// ),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// const Icon(Icons.access_time_rounded,
// size: 14, color: Colors.black45),
// const SizedBox(
// width: 4,
// ),
// Text(
// "5 Minutes",
// style: TextStyle(
// color: kblackSubHeading,
// fontSize: 14,
// ),
// ),
// ],
// )
// ],
// ),
// )
// ],
// ),
// ],
// ),
}
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);
Color kdarkBlueMuted = Color(0xFF5495C2).withOpacity(0.7);
Color kdarkBlueMuted = const Color(0xFF5495C2).withOpacity(0.7);
const Color kpurple = Color(0xFF9B7CF5);
const Color klightPurple = Color(0xFF9797D3);
const Color kyellow = Color(0xFFF2C634);
Expand Down
1 change: 0 additions & 1 deletion lib/models/user.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'dart:convert';

class User {
Expand Down
1 change: 0 additions & 1 deletion lib/models/yoga.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'dart:convert';
import 'dart:ffi';

class Yoga {
final String id;
Expand Down
8 changes: 3 additions & 5 deletions lib/openAI/open_AI.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final List<String> yogaPhrases = [

Future<String> fetchYogaPose(String question) async {

final String apiUrl = 'https://api.openai.com/v1/chat/completions';
const String apiUrl = 'https://api.openai.com/v1/chat/completions';

final Map<String, String> headers = {
'Content-Type': 'application/json',
Expand All @@ -32,8 +32,6 @@ Future<String> fetchYogaPose(String question) async {
// final String question = "Tell me something that is good for mental and physical health.";
final String prompt = 'Is the following topic related to yoga? Answer in yes or no and then generate the answer in 50 words only if the question is related to yoga.$question';

// l.add({"role": "user", "content": prompt});

final Map<String, dynamic> data = {
'messages' : [{"role": "user", "content": prompt}],
'model' : "gpt-3.5-turbo",
Expand All @@ -50,7 +48,7 @@ Future<String> fetchYogaPose(String question) async {
// print(response.body);

Map<String, dynamic> jsonResponse = json.decode(response.body);
print(jsonResponse);
//print(jsonResponse);

String content = jsonResponse["choices"][0]["message"]["content"];

Expand All @@ -70,7 +68,7 @@ Future<String> fetchYogaPose(String question) async {
}
}

print(content);
//print(content);
// print(l);

if (response.statusCode == 200) {
Expand Down
3 changes: 0 additions & 3 deletions lib/screens/auth/auth_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class _AuthScreenState extends State<AuthScreen> with TickerProviderStateMixin {
super.dispose();
}

// - 120 + MediaQuery.sizeOf(context).height * 0.76
@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down Expand Up @@ -155,12 +154,10 @@ class _AuthScreenState extends State<AuthScreen> with TickerProviderStateMixin {
],
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(12),
// color: kdarkBlue,
),
controller: _tabController,
isScrollable: true,

// labelPadding: EdgeInsets.symmetric(horizontal: 40, vertical: 4),
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/auth/signup_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class _SignupState extends State<Signup> {
),
child: Center(
child: isSignupTapped
? CircularProgressIndicator(
? const CircularProgressIndicator(
color: Colors.white,
)
: Text(
: const Text(
"Sign Up",
style: TextStyle(color: Colors.white),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/challenge/components/challenge_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class yogaChallengeCard extends StatelessWidget {
child: ListTile(
title: Text(
'Day $day',
style: TextStyle(
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
Expand Down
Loading

0 comments on commit e82e8c5

Please sign in to comment.