add notification for lesson updates

This commit is contained in:
hihihaha
2023-08-29 15:36:23 +02:00
parent e280227ee1
commit ea2b91ca15
8 changed files with 334 additions and 12 deletions

View File

@@ -142,6 +142,32 @@ class NotificationsScreen extends StatelessWidget {
),
],
),
),
SwitchListTile(
value: settings.notificationsLessonsEnabled,
onChanged: (v) => {settings.update(notificationsLessonsEnabled: v)},
title: Row(
children: [
const SizedBox(width: 8),
settings.notificationsLessonsEnabled
? const Icon(FeatherIcons.calendar)
: Icon(FeatherIcons.calendar,
color:
AppColors.of(context).text.withOpacity(.25)),
const SizedBox(width: 23.0),
Expanded(
child: Text(
"lessons".i18n,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16.0,
color: AppColors.of(context).text.withOpacity(
settings.notificationsLessonsEnabled ? 1.0 : .5),
),
),
),
],
),
)
]),
))));

View File

@@ -8,6 +8,7 @@ extension SettingsLocalization on String {
"grades": "Grades",
"absences": "Absences",
"messages": "Messages",
"lessons": "Lessons"
},
"hu_hu": {
@@ -15,12 +16,14 @@ extension SettingsLocalization on String {
"grades": "Jegyek",
"absences": "Hiányzások",
"messages": "Üzenetek",
"lessons": "Órák"
},
"de_de": {
"notifications_screen": "Mitteilung",
"grades": "Noten",
"absences": "Fehlen",
"messages": "Nachrichten"
"messages": "Nachrichten",
"lessons": "Unterricht"
},
};