Complete refactor to clean up project

This commit is contained in:
2026-02-04 11:36:02 +01:00
parent 4f380b5444
commit 704bd0b928
29 changed files with 2057 additions and 1464 deletions

View File

@@ -0,0 +1,37 @@
/// Application configuration model.
///
/// Stores user preferences that are persisted across sessions,
/// such as display mode and fullscreen settings.
class Config {
/// Storage keys for persistence
static const String keyTwoPageMode = 'twoPageMode';
static const String keyFullscreen = 'fullscreen';
/// Whether to display two pages side-by-side (for tablets/landscape).
bool twoPageMode;
/// Whether the app is in fullscreen mode.
bool fullscreen;
Config({
required this.twoPageMode,
required this.fullscreen,
});
/// Creates a default configuration with all options disabled.
factory Config.defaultConfig() => Config(
twoPageMode: false,
fullscreen: false,
);
/// Creates a copy of this config with optional overrides.
Config copyWith({
bool? twoPageMode,
bool? fullscreen,
}) {
return Config(
twoPageMode: twoPageMode ?? this.twoPageMode,
fullscreen: fullscreen ?? this.fullscreen,
);
}
}