implemented dynamic module settings and configurable bottom bar, added all-day event support to timetable, and overhauled marianum dates UI with month grouping and search
This commit is contained in:
@@ -8,10 +8,14 @@ part 'modules_settings.g.dart';
|
||||
class ModulesSettings {
|
||||
List<Modules> moduleOrder;
|
||||
List<Modules> hiddenModules;
|
||||
bool autoFillBottomBar;
|
||||
int fixedBottomBarSlots;
|
||||
|
||||
ModulesSettings({
|
||||
required this.moduleOrder,
|
||||
required this.hiddenModules
|
||||
required this.hiddenModules,
|
||||
this.autoFillBottomBar = true,
|
||||
this.fixedBottomBarSlots = 3,
|
||||
});
|
||||
|
||||
factory ModulesSettings.fromJson(Map<String, dynamic> json) => _$ModulesSettingsFromJson(json);
|
||||
|
||||
@@ -14,6 +14,8 @@ ModulesSettings _$ModulesSettingsFromJson(Map<String, dynamic> json) =>
|
||||
hiddenModules: (json['hiddenModules'] as List<dynamic>)
|
||||
.map((e) => $enumDecode(_$ModulesEnumMap, e))
|
||||
.toList(),
|
||||
autoFillBottomBar: json['autoFillBottomBar'] as bool? ?? true,
|
||||
fixedBottomBarSlots: (json['fixedBottomBarSlots'] as num?)?.toInt() ?? 3,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ModulesSettingsToJson(
|
||||
@@ -23,6 +25,8 @@ Map<String, dynamic> _$ModulesSettingsToJson(
|
||||
'hiddenModules': instance.hiddenModules
|
||||
.map((e) => _$ModulesEnumMap[e]!)
|
||||
.toList(),
|
||||
'autoFillBottomBar': instance.autoFillBottomBar,
|
||||
'fixedBottomBarSlots': instance.fixedBottomBarSlots,
|
||||
};
|
||||
|
||||
const _$ModulesEnumMap = {
|
||||
|
||||
@@ -11,7 +11,7 @@ class TimetableSettings {
|
||||
|
||||
TimetableSettings({
|
||||
required this.connectDoubleLessons,
|
||||
required this.timetableNameMode
|
||||
required this.timetableNameMode,
|
||||
});
|
||||
|
||||
factory TimetableSettings.fromJson(Map<String, dynamic> json) => _$TimetableSettingsFromJson(json);
|
||||
|
||||
Reference in New Issue
Block a user