Files
TPSchedule/mobile/lib/domain/app_settings.dart
T

38 lines
1.1 KiB
Dart

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,
);
}