-
Notifications
You must be signed in to change notification settings - Fork 14
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
Daily meditation reminder #132
base: main
Are you sure you want to change the base?
Conversation
lib/enums/taskoptions.dart
Outdated
@@ -1,2 +1,2 @@ | |||
// Enum to represent options in the menu | |||
enum TaskOption { deleteAll,showKudos,launchMeditationScreen,toggleTipVisibility,exportToCSV } | |||
enum TaskOption { deleteAll,showKudos,launchMeditationScreen,toggleTipVisibility,exportToCSV,toggleMDR } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment explaining the variable name so that it is clearly understood by other contributors.
lib/screens/home_screen.dart
Outdated
@@ -30,6 +33,8 @@ class _HomeScreenState extends State<HomeScreen> { | |||
List<Task> tasks = []; | |||
Kudos kudos = Kudos(score: 0, history: []); | |||
Tip? tip; | |||
bool MeditationDailyRemider = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow Dart camel casing here
lib/screens/home_screen.dart
Outdated
} | ||
|
||
void _loadMeditationDailyReminderDetails() async { | ||
var _MeditationDailyRremider = await MeditationDailyRemiderStorage.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be an issue with the variable name
lib/screens/home_screen.dart
Outdated
|
||
void _loadMeditationDailyReminderDetails() async { | ||
var _MeditationDailyRremider = await MeditationDailyRemiderStorage.get(); | ||
var _LastDateMeditationReminded = await MeditationDailyRemiderStorage.getLastDate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow camel casing everywhere
lib/screens/home_screen.dart
Outdated
|
||
} | ||
void _checkMeditationReminder() async { | ||
print(LastDateMeditationReminded); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove pring statements in production
lib/screens/home_screen.dart
Outdated
final file = File(path); | ||
await file.writeAsString(csv); | ||
|
||
print("File saved at: $path"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this print statement as well
|
||
|
||
class MeditationDailyRemiderStorage { | ||
static const String _MDRSKey = 'MDRS'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camel case please!
break; | ||
} | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOF line required here!
builder: (context) => const MeditationCheckDialog(), | ||
).then((value) { | ||
switch (value) { | ||
case 'yes': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be better if implemented using an enum
376a026
to
6a77e55
Compare
@pranavkonidena Made all the fixes, please check. |
@pranavkonidena merge conflicts resolved, please review. |
@Sanat-Jha Please resolve merge conflicts |
@Akshit517 resolved. |
Related Issue
Closes #131
Type of Change
Put
x
inside the square bracket to specify what type of change your PR is:Description of Change
User can choose to have to a daily reminder of meditation. When this option is turned on, user daily gets a reminder to do a meditation session on the first app run of that day.
Demo