Skip to content
Open
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 removed assets/yoga_person.png
Binary file not shown.
Binary file added assets/yoga_women1.png
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 assets/yoga_women2.png
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 assets/yoga_women3.png
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 fonts/merriweather_bold.ttf
Binary file not shown.
Binary file added fonts/merriweather_regular.ttf
Binary file not shown.
Binary file added fonts/urbanist_bold.ttf
Binary file not shown.
Binary file added fonts/urbanist_extrabold.ttf
Binary file not shown.
Binary file added fonts/urbanist_light.ttf
Binary file not shown.
Binary file added fonts/urbanist_medium.ttf
Binary file not shown.
Binary file added fonts/urbanist_regular.ttf
Binary file not shown.
Binary file added fonts/urbanist_semibold.ttf
Binary file not shown.
18 changes: 10 additions & 8 deletions lib/data/data/habit/habit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,30 @@ class HabitRecordData with _$HabitRecordData {
@HiveType(typeId: 3)
enum HabitCategory {
@HiveField(0)
sports(Icons.sports_soccer, Colors.green),
sports(Icons.sports_basketball, Colors.orange),
@HiveField(1)
health(Icons.local_hospital, Colors.red),
health(Icons.monitor_heart, Color(0xffADE25D)),
@HiveField(2)
work(Icons.work, Colors.blue),
@HiveField(3)
study(Icons.book, Colors.purple),
study(Icons.book, Color(0xffFBBFCA)),
@HiveField(4)
food(Icons.fastfood, Colors.orange),
food(Icons.restaurant, Colors.green),
@HiveField(5)
finance(Icons.monetization_on, Colors.yellow),
@HiveField(6)
yoga(Icons.self_improvement, Colors.pink),
yoga(Icons.self_improvement, Color(0xffD664BE)),
@HiveField(7)
social(Icons.people, Colors.teal),
social(Icons.people, Color(0xffF6BE9A)),
@HiveField(8)
fun(Icons.emoji_emotions, Colors.deepPurple),
fun(Icons.headphones, Color(0xff7CC6FE)),
@HiveField(9)
outdoors(Icons.nature_people, Colors.green),
outdoors(Icons.sports_tennis, Color(0xff8789C0)),
@HiveField(10)
reading(Icons.menu_book, Colors.blue),
@HiveField(11)
fitness(Icons.fitness_center, Colors.indigoAccent),
@HiveField(12)
others(Icons.grid_view_rounded, Colors.grey);

final IconData icon;
Expand Down
9 changes: 8 additions & 1 deletion lib/data/data/habit/habit.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class MyApp extends StatelessWidget {
// navigatorObservers: [],
debugShowCheckedModeBanner: false,
title: 'Rise',
theme: AppTheme.lightTheme(lightColorScheme),
darkTheme: AppTheme.darkTheme(darkColorScheme),
theme: AppTheme.darkTheme(darkColorScheme),
home: const _AppBootstrapper(),
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';

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

@override
Widget build(BuildContext context) {
return const Placeholder(
child: Text('Settings Screen'),
child: Text("Analytics Screen"),
);
}
}
50 changes: 28 additions & 22 deletions lib/screens/habits/add_habit_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:rise/theme.dart';

import '../../data/data/habit/habit.dart';
import '../onboarding/components/components.dart';
import 'dart:math';

class AddHabitScreen extends StatefulWidget {
const AddHabitScreen({super.key});
Expand All @@ -17,6 +18,16 @@ class AddHabitScreen extends StatefulWidget {
class _AddHabitScreenState extends State<AddHabitScreen> {
final _habitNameController = TextEditingController();

String getRandomImg() {
const images = [
// "assets/yoga_women1.png",
"assets/yoga_women2.png",
"assets/yoga_women3.png",
];
final random = Random();
return images[random.nextInt(images.length)];
}

@override
Widget build(BuildContext context) {
final height = context.height;
Expand All @@ -27,14 +38,13 @@ class _AddHabitScreenState extends State<AddHabitScreen> {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
// leading: IconButton(
// icon: const Icon(Icons.arrow_back_ios),
// onPressed: () {
// Navigator.pop(context);
// },
// ),
title: const Text('Add Habit'),
),
// leading: IconButton(
// icon: const Icon(Icons.arrow_back_ios),
// onPressed: () {
// Navigator.pop(context);
// },
// ),
),
body: Padding(
padding: EdgeInsets.symmetric(horizontal: width * 0.2),
child: Column(
Expand All @@ -44,10 +54,8 @@ class _AddHabitScreenState extends State<AddHabitScreen> {
/// Title
Text(
'Put a name for \nyour Habit',
style: textTheme.titleMedium?.copyWith(
fontSize: 20,
fontWeight: FontWeight.w500,
),
style: textTheme.titleMedium
?.copyWith(fontSize: 20, fontFamily: "Merriweather"),
textAlign: TextAlign.start,
),
const SizedBox(height: 16),
Expand All @@ -59,7 +67,7 @@ class _AddHabitScreenState extends State<AddHabitScreen> {
keyboardType: TextInputType.text,
textCapitalization: TextCapitalization.sentences,
decoration: InputDecoration(
hintText: 'eg: Go to Gym',
hintText: 'eg: Gym',
hintStyle: TextStyle(color: colorScheme.outline),
filled: true,
fillColor: colorScheme.onInverseSurface,
Expand All @@ -78,8 +86,8 @@ class _AddHabitScreenState extends State<AddHabitScreen> {

/// Bottom Section: Illustration
Image.asset(
'assets/yoga_person.png',
height: 150,
getRandomImg(),
height: 200,
),
SizedBox(height: height * 0.1),
],
Expand Down Expand Up @@ -131,10 +139,8 @@ class SelectHabitCategory extends StatelessWidget {
Text(
'Select a category for\nyour habit',
textAlign: TextAlign.center,
style: context.textTheme.titleMedium?.copyWith(
fontSize: 20,
fontWeight: FontWeight.w500,
),
style: context.textTheme.titleMedium
?.copyWith(fontSize: 20, fontFamily: "Merriweather"),
),
const SizedBox(height: 16),

Expand Down Expand Up @@ -189,9 +195,9 @@ class HabitCategoryCard extends StatelessWidget {
return GestureDetector(
onTap: onTap,
child: Container(
height: 88,
width: 88,
margin: const EdgeInsets.all(8),
height: 80,
width: 100,
margin: const EdgeInsets.only(left: 4, right: 4),
decoration: BoxDecoration(
color: cardColor.withAlpha(80),
borderRadius: BorderRadius.circular(12),
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/habits/components/habit_gridview_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HabitGridviewCard extends StatelessWidget {
margin: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
padding: const EdgeInsets.symmetric(horizontal: 16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.0),
borderRadius: BorderRadius.circular(16.0),
border: Border.all(
color: cardColor.withAlpha(80),
),
Expand Down
30 changes: 21 additions & 9 deletions lib/screens/habits/components/habit_listview_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ class HabitListViewCard extends StatelessWidget {
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
cardColor.withAlpha(80),
// cardColor.withOpacity(0.4),
cardColor.withAlpha(16),
cardColor.withAlpha(55),
cardColor.withAlpha(25),
cardColor.withAlpha(8),
cardColor.withAlpha(0),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(8.0),
borderRadius: BorderRadius.circular(16.0),
),
child: Column(
children: [
Expand All @@ -49,7 +52,13 @@ class HabitListViewCard extends StatelessWidget {
),

/// Habit Title
title: Text(data.name),
title: Text(
data.name,
style: context.textTheme.titleLarge?.copyWith(
fontFamily: "Merriweather",
fontSize: 20.0
),
),

/// Habit more options
trailing: CircleAvatar(
Expand Down Expand Up @@ -117,10 +126,13 @@ class DateTile extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
/// Day of the week
Text(
StringUtils.getWeekDay(date),
style: textTheme.labelSmall?.copyWith(
fontWeight: FontWeight.w300,
Opacity(
opacity: 0.7,
child: Text(
StringUtils.getWeekDay(date),
style: textTheme.labelSmall?.copyWith(
fontWeight: FontWeight.w300,
),
),
),

Expand Down
Loading