added theme setting; fixed light theme issues
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:bang_navigator/features/content_block/data/models/host.dart';
|
||||
import 'package:copy_with_extension/copy_with_extension.dart';
|
||||
import 'package:fast_equatable/fast_equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
part 'settings.g.dart';
|
||||
|
||||
@@ -13,6 +14,7 @@ class Settings with FastEquatable {
|
||||
final bool launchUrlExternal;
|
||||
final bool enableContentBlocking;
|
||||
final Set<HostSource> enableHostList;
|
||||
final ThemeMode themeMode;
|
||||
|
||||
Settings({
|
||||
required this.kagiSession,
|
||||
@@ -22,6 +24,7 @@ class Settings with FastEquatable {
|
||||
required this.launchUrlExternal,
|
||||
required this.enableContentBlocking,
|
||||
required this.enableHostList,
|
||||
required this.themeMode,
|
||||
});
|
||||
|
||||
Settings.withDefaults({
|
||||
@@ -32,12 +35,14 @@ class Settings with FastEquatable {
|
||||
bool? launchUrlExternal,
|
||||
bool? enableContentBlocking,
|
||||
Set<HostSource>? enableHostList,
|
||||
ThemeMode? themeMode,
|
||||
}) : showEarlyAccessFeatures = showEarlyAccessFeatures ?? true,
|
||||
incognitoMode = incognitoMode ?? true,
|
||||
enableJavascript = enableJavascript ?? true,
|
||||
launchUrlExternal = launchUrlExternal ?? false,
|
||||
enableContentBlocking = enableContentBlocking ?? true,
|
||||
enableHostList = enableHostList ?? {HostSource.stevenBlackUnified};
|
||||
enableHostList = enableHostList ?? {HostSource.stevenBlackUnified},
|
||||
themeMode = themeMode ?? ThemeMode.dark;
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
@@ -51,5 +56,6 @@ class Settings with FastEquatable {
|
||||
launchUrlExternal,
|
||||
enableContentBlocking,
|
||||
enableHostList,
|
||||
themeMode,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user