feat: add validated semester and lesson calculations
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import 'semester.dart';
|
||||
|
||||
enum ColorMode { single, multicolor }
|
||||
|
||||
class AppSettings {
|
||||
const AppSettings({
|
||||
this.semester,
|
||||
this.remindersEnabled = true,
|
||||
this.reminderMinutes = 15,
|
||||
this.colorMode = ColorMode.multicolor,
|
||||
this.singleColorArgb = 0xFF348F91,
|
||||
this.calendarEnabled = false,
|
||||
this.calendarId,
|
||||
});
|
||||
final Semester? semester;
|
||||
final bool remindersEnabled, calendarEnabled;
|
||||
final int reminderMinutes, singleColorArgb;
|
||||
final ColorMode colorMode;
|
||||
final String? calendarId;
|
||||
AppSettings copyWith({
|
||||
Semester? semester,
|
||||
bool? remindersEnabled,
|
||||
int? reminderMinutes,
|
||||
ColorMode? colorMode,
|
||||
int? singleColorArgb,
|
||||
bool? calendarEnabled,
|
||||
String? calendarId,
|
||||
}) => AppSettings(
|
||||
semester: semester ?? this.semester,
|
||||
remindersEnabled: remindersEnabled ?? this.remindersEnabled,
|
||||
reminderMinutes: reminderMinutes ?? this.reminderMinutes,
|
||||
colorMode: colorMode ?? this.colorMode,
|
||||
singleColorArgb: singleColorArgb ?? this.singleColorArgb,
|
||||
calendarEnabled: calendarEnabled ?? this.calendarEnabled,
|
||||
calendarId: calendarId ?? this.calendarId,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user