Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.
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
4 changes: 2 additions & 2 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sdk.dir=/Users/daryleurrea/Library/Android/sdk
flutter.sdk=/Users/daryleurrea/developer/flutter
sdk.dir=C:\\JavaStuff\\DartAndFluttterStuff\\Android\\sdk
flutter.sdk=C:\\JavaStuff\\DartAndFluttterStuff\\flutter
flutter.buildMode=debug
flutter.versionName=99.99.99
flutter.versionCode=99
20 changes: 19 additions & 1 deletion i18n/ar-SY.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,23 @@
"week": "أسبوع",
"month": "شهر",
"bad": "سيئة",
"sendTask": "إرسال المهمة"
"sendTask": "إرسال المهمة",
"green": "أخضر",
"orange": "البرتقالي",
"yellow": "الأصفر",
"purple": "أرجواني",
"grey": "رمادي",
"darkMode": "الوضع الداكن",
"overviewOfTasks": "ملخص المهام",
"overviewOfNotes": "ملخص الملاحظات",
"overviewOfCalendar": "ملخص التقويم",
"overviewOfProfile": "ملخص الملف الشخصي",
"overviewOfSettings": "ملخص الإعدادات",
"overviewOfChat": "ملخص الدردشة",
"howToCreateATask": "كيفية إنشاء مهمة",
"howToCompleteATask": "كيف تكمل مهمة",
"otherNotes": "موضوعات الملاحظات الأخرى",
"otherCalendar": "مواضيع التقويم الأخرى",
"otherProfile": "مواضيع الملف الشخصي الأخرى",
"otherSettings": "مواضيع الإعدادات الأخرى"
}
20 changes: 19 additions & 1 deletion i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,23 @@
"week": "Week",
"month": "Month",
"bad": "Bad",
"sendTask": "Send Task"
"sendTask": "Send Task",
"green": "Green",
"orange": "Orange",
"yellow": "Yellow",
"purple": "Purple",
"grey": "Grey",
"darkMode": "Dark Mode",
"overviewOfTasks": "Overview of Tasks",
"overviewOfNotes": "Overview of Notes",
"overviewOfCalendar": "Overview of Calendar",
"overviewOfProfile": "Overview of Profile",
"overviewOfSettings": "Overview of Settings",
"overviewOfChat": "Overview of Chat",
"howToCreateATask": "How to create a Task",
"howToCompleteATask": "How to complete a Task",
"otherNotes": "Other topics on Notes",
"otherCalendar": "Other topics on Calendar",
"otherProfile": "Other topics on Profile",
"otherSettings": "Other topics on Settings"
}
20 changes: 19 additions & 1 deletion i18n/es-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,23 @@
"week": "Semana",
"month": "Mes",
"bad": "Malo",
"sendTask": "Enviar tarea"
"sendTask": "Enviar tarea",
"green": "Verde",
"orange": "Naranja",
"yellow": "Amarillo",
"purple": "Morado",
"grey": "Gris",
"darkMode": "Modo oscuro",
"overviewOfTasks": "Resumen de Tareas",
"overviewOfNotes": "Resumen de Notas",
"overviewOfCalendar": "Resumen del Calendario",
"overviewOfProfile": "Resumen del Perfil",
"overviewOfSettings": "Resumen de Configuraciones",
"overviewOfChat": "Resumen de la Charla",
"howToCreateATask": "Cómo crear una Tarea",
"howToCompleteATask": "Cómo completar una Tarea",
"otherNotes": "Otros temas de Notas",
"otherCalendar": "Otros temas del Calendario",
"otherProfile": "Otros temas de Perfil",
"otherSettings": "Otros temas de Configuraciones"
}
20 changes: 19 additions & 1 deletion i18n/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,23 @@
"week": "Semana",
"month": "Mês",
"bad": "Mau",
"sendTask": "Enviar tarefa"
"sendTask": "Enviar tarefa",
"green": "Verde",
"orange": "laranja",
"yellow": "Amarelo",
"purple": "Roxo",
"grey": "Cinza",
"darkMode": "Modo escuro",
"overviewOfTasks": "Resumo das Tarefas",
"overviewOfNotes": "Resumo das Notas",
"overviewOfCalendar": "Resumo do Calendário",
"overviewOfProfile": "Resumo do perfil",
"overviewOfSettings": "Resumo das configurações",
"overviewOfChat": "Resumo do bate-papo",
"howToCreateATask": "Como criar uma Tarefa",
"howToCompleteATask": "Como concluir uma Tarefa",
"otherNotes": "Outros tópicos de Notas",
"otherCalendar": "Outros tópicos do Agenda",
"otherProfile": "Outros tópicos do Perfil",
"otherSettings": "Outros tópicos de configurações"
}
20 changes: 19 additions & 1 deletion i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,23 @@
"week": "星期",
"month": "月",
"bad": "坏的",
"sendTask": "发送任务"
"sendTask": "发送任务",
"green": "绿色的",
"orange": "橘子",
"yellow": "黄色的",
"purple": "紫色的",
"grey": "灰色的",
"darkMode": "黑暗模式",
"overviewOfTasks": "任务总结",
"overviewOfNotes": "笔记摘要",
"overviewOfCalendar": "日历摘要",
"overviewOfProfile": "简介概要",
"overviewOfSettings": "设置摘要",
"overviewOfChat": "聊天总结",
"howToCreateATask": "如何创建任务",
"howToCompleteATask": "如何完成任务",
"otherNotes": "其他笔记主题",
"otherCalendar": "其他日历主题",
"otherProfile": "其他个人资料主题",
"otherSettings": "其他设置主题"
}
24 changes: 22 additions & 2 deletions lib/Model/Setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum FontSize {
LARGE,
}

enum AppTheme { BLUE, PINK } /// prob needs to be changed
enum AppTheme { BLUE, PINK, RED, ORANGE, GREEN, DARK, GREY, PURPLE, YELLOW} /// prob needs to be changed

fontSizeStringToEnum(String fontSizeString) {
switch (fontSizeString) {
Expand All @@ -31,9 +31,25 @@ appThemeStringToEnum(String appTheme) { ///needs to be changed with appTheme
return AppTheme.BLUE;
case 'AppTheme.PINK':
return AppTheme.PINK;
case 'AppTheme.RED':
return AppTheme.RED;
case 'AppTheme.ORANGE':
return AppTheme.ORANGE;
case 'AppTheme.GREEN':
return AppTheme.GREEN;
case 'AppTheme.DARK':
return AppTheme.DARK;
case 'AppTheme.GREY':
return AppTheme.GREY;
case 'AppTheme.PURPLE':
return AppTheme.PURPLE;
case 'AppTheme.YELLOW':
return AppTheme.YELLOW;
}
}

const DEFAULT_DARK_MODE = false;

const DEFAULT_FONT_SIZE = FontSize.MEDIUM;

const DEFAULT_DAYS_TO_KEEP_FILES = "7";
Expand Down Expand Up @@ -80,7 +96,7 @@ const DEFAULT_ENABLE_VOICE_OVER_TEXT = true;

const DEFAULT_MINUTES_BEFORE_NOTE_NOTIFICATIONS = "3";

const DEFAULT_MINUTES_BEFORE_TASK_NOTIFICATIONS = "1";
const DEFAULT_MINUTES_BEFORE_TASK_NOTIFICATIONS = "3";

const DEFAULT_ENABLE_NOTES_NOTIFICATIONS = true;

Expand All @@ -98,6 +114,8 @@ class Setting {
//bool to track if the app is newly installed
bool isFirstRun = DEFAULT_IS_FIRST_RUN;

bool darkMode = DEFAULT_DARK_MODE;

// language of preference
Locale locale = DEFAULT_LOCALE;

Expand All @@ -124,6 +142,7 @@ class Setting {
String jsonStr = """{"daysToKeepFiles": "${this.daysToKeepFiles}",
"locale": "${this.locale.toString()}",
"isFirstRun": ${this.isFirstRun},
"darkMode": ${this.darkMode},
"enableVoiceOverText": ${this.enableVoiceOverText},
"appTheme": "${this.appTheme.toString()}",
"noteFontSize": "${this.noteFontSize.toString()}",
Expand All @@ -148,6 +167,7 @@ class Setting {
setting.locale = DEFAULT_LOCALE;
}
setting.daysToKeepFiles = jsonObj['daysToKeepFiles']?.toString() ?? DEFAULT_DAYS_TO_KEEP_FILES;
setting.darkMode = jsonObj['darkMode'] ?? DEFAULT_DARK_MODE;
setting.isFirstRun = jsonObj['isFirstRun'] ?? DEFAULT_IS_FIRST_RUN;
setting.enableVoiceOverText = jsonObj['enableVoiceOverText'] ?? DEFAULT_ENABLE_VOICE_OVER_TEXT;
setting.noteFontSize = fontSizeStringToEnum(jsonObj['noteFontSize']) ?? DEFAULT_FONT_SIZE;
Expand Down
46 changes: 8 additions & 38 deletions lib/Screens/Calendar/Calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:intl/intl.dart';
import 'package:memorez/Utility/ThemeUtil.dart';
import 'package:table_calendar/table_calendar.dart';
import 'package:memorez/Model/CalendarEvent.dart';
import 'package:memorez/Model/Note.dart';
Expand All @@ -18,6 +19,8 @@ final viewCalendarScaffoldKey = GlobalKey<ScaffoldState>();
//Variable Definitions ----------------------------------------
bool _filteredNotesIsVisible = false;

Color? textCol;

DateTime _focusedDay = DateTime.now();
List<CalenderEvent> _events = [];
ValueNotifier<bool> _dayAndEventsUpdated = ValueNotifier(false);
Expand All @@ -39,6 +42,8 @@ class CalendarState extends State<Calendar> {
final calendarObserver = Provider.of<CalendarObservable>(context);
final settingObserver = Provider.of<SettingObserver>(context);

textCol = textMode(settingObserver.userSettings.darkMode);

calendarObserver.setNoteObserver(noteObserver);
calendarObserver.generateDailyTiles();
List<Container> _daysAndEvents = calendarObserver.generateDailyTiles();
Expand Down Expand Up @@ -121,11 +126,11 @@ class CalendarState extends State<Calendar> {
child: new ListTile(
//onTap: () => print('${value[index]}'),
title: Text("${_matchedEvents[index].text}",
style: TextStyle(color: Colors.black),
style: TextStyle(color: textCol),
textAlign: TextAlign.center),
subtitle: Text(
"${DateFormat('MM-dd-yyyy').format(DateTime.parse((_matchedEvents[index].eventDate)))} \t at \t ${_matchedEvents[index].eventTime}",
style: TextStyle(color: Colors.black),
style: TextStyle(color: textCol),
textAlign: TextAlign.center),
),
),
Expand Down Expand Up @@ -180,11 +185,10 @@ class CalendarState extends State<Calendar> {

if (_events.length > 0) {
calendarObserver.weekView();

try {
calendarObserver.getNotesOnDay();
}catch (error) {
print('err');
print('setttttttttttttttt state errrrrrrrrrrrrrrror');
}
}
(context as Element).reassemble();
Expand Down Expand Up @@ -233,7 +237,6 @@ class CalendarState extends State<Calendar> {
}),
),
),

const SizedBox(height: 8.0),
Visibility(
visible: calendarObserver.getNotesOnDayIsVisible(),
Expand Down Expand Up @@ -262,39 +265,6 @@ class CalendarState extends State<Calendar> {
}),
),
)
//Area under Calendar displaying notes--------------------------------
// Visibility(
// visible: calendarObserver.getNotesOnDayIsVisible(),
// child: Expanded(
// child: ValueListenableBuilder<List<CalenderEvent>>(
// valueListenable: calendarObserver.selectedEvents,
// builder: (context, value, _) {
// print("Initialized Value Notifier: ");
// return ListView.builder(
// itemCount: value.length,
// itemBuilder: (context, index) {
// return Container(
// height: 50,
// margin: const EdgeInsets.symmetric(
// horizontal: 12.0,
// vertical: 3,
// ),
// decoration: BoxDecoration(
// color: Colors.lightBlue.shade50,
// border: Border.all(color: Colors.blueGrey, width: 1),
// borderRadius: BorderRadius.circular(12.0),
// ),
// child: ListTile(
// //onTap: () => print('${value[index]}'),
// title: Text(
// "${value[index]} \t at \t ${value[index].time}",
// textAlign: TextAlign.center),
// ),
// );
// });
// },
// )),
// )
]),
),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/Screens/Calendar/CalendarFormatBar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class _calendarFormatBarState extends State<calendarFormatBar> {
},
),
VerticalDivider(
color: Colors.black,
color: Colors.tealAccent,
thickness: 2,
width: 20,
indent: 10,
Expand Down
3 changes: 3 additions & 0 deletions lib/Screens/Main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:memorez/generated/i18n.dart';
import 'package:memorez/Screens/Settings/Help.dart';
import '../DatabaseHandler/DBHelper.dart';
import '../Model/UserModel.dart';
import '../Utility/ThemeUtil.dart';
import 'Profile/UserProfile.dart';
import 'Settings/Setting.dart';
import 'Note/Note.dart';
Expand Down Expand Up @@ -259,6 +260,8 @@ class _MainNavigatorState extends State<MainNavigator> {
final menuObserver = Provider.of<MenuObserver>(context);
return Observer(
builder: (_) => Scaffold(
///
backgroundColor: backgroundMode(settingObserver.userSettings.darkMode),
resizeToAvoidBottomInset:screenNav.currentScreen!=MAIN_SCREENS.CALENDAR,
appBar: AppBar(
//removes the backbutton in the appbar
Expand Down
Loading