Skip to content

Commit da47c0c

Browse files
committed
fix unthemed ui and cast error
1 parent 0d08344 commit da47c0c

9 files changed

Lines changed: 71 additions & 63 deletions

File tree

android/app/.cxx/Debug/6x714b3w/arm64-v8a/configure_fingerprint.bin

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ C/C++ Structured Logq
22
o
33
mC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\additional_project_files.txtC
44
A
5-
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  û؞�2  �����2n
5+
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ����2  �����2n
66
l
7-
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\android_gradle_build.json  û؞�2� Ȑ���2s
7+
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\android_gradle_build.json  ����2� Ȑ���2s
88
q
9-
oC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\android_gradle_build_mini.json  û؞�2� ֐���2`
9+
oC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\android_gradle_build_mini.json  ����2� ֐���2`
1010
^
11-
\C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\build.ninja  û؞�2�� �����2d
11+
\C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\build.ninja  ����2�� �����2d
1212
b
13-
`C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\build.ninja.txt  û؞�2i
13+
`C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\build.ninja.txt  ����2i
1414
g
15-
eC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\build_file_index.txt  û؞�2W ܐ���2j
15+
eC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\build_file_index.txt  ����2W ܐ���2j
1616
h
17-
fC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\compile_commands.json  û؞�2n
17+
fC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\compile_commands.json  ����2n
1818
l
19-
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\compile_commands.json.bin  û؞�2 t
19+
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\compile_commands.json.bin  ����2 t
2020
r
21-
pC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\metadata_generation_command.txt  û؞�2
21+
pC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\metadata_generation_command.txt  ����2
2222
� ڐ���2g
2323
e
24-
cC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\prefab_config.json  Ż؞�2 ( ڐ���2l
24+
cC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\prefab_config.json  ����2 ( ڐ���2l
2525
j
26-
hC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\symbol_folder_index.txt  Ż؞�2 _ ܐ���2[
26+
hC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\arm64-v8a\symbol_folder_index.txt  ����2 _ ܐ���2[
2727
Y
28-
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  Ż؞�2� �����2
28+
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ����2� �����2

android/app/.cxx/Debug/6x714b3w/armeabi-v7a/configure_fingerprint.bin

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ C/C++ Structured Logs
22
q
33
oC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\additional_project_files.txtC
44
A
5-
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �؞�2  ä���2p
5+
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ����2  ��2p
66
n
7-
lC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\android_gradle_build.json  �؞�2� Ť���2u
7+
lC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\android_gradle_build.json  ����2� Ť���2u
88
s
9-
qC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\android_gradle_build_mini.json  �؞�2� ʤ���2b
9+
qC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\android_gradle_build_mini.json  ����2� ʤ���2b
1010
`
11-
^C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\build.ninja  �؞�2�� ǣ���2f
11+
^C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\build.ninja  ����2�� ǣ���2f
1212
d
13-
bC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\build.ninja.txt  �؞�2k
13+
bC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\build.ninja.txt  ����2k
1414
i
15-
gC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\build_file_index.txt  �؞�2W Ϥ���2l
15+
gC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\build_file_index.txt  ����2W Ϥ���2l
1616
j
17-
hC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\compile_commands.json  �؞�2p
17+
hC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\compile_commands.json  ����2p
1818
n
19-
lC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\compile_commands.json.bin  �؞�2 v
19+
lC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\compile_commands.json.bin  ����2 v
2020
t
21-
rC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\metadata_generation_command.txt  �؞�2
21+
rC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\metadata_generation_command.txt  ����2
2222
� ˤ���2i
2323
g
24-
eC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\prefab_config.json  �؞�2 ( ͤ���2n
24+
eC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\prefab_config.json  ����2 ( ͤ���2n
2525
l
26-
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\symbol_folder_index.txt  �؞�2 a Τ���2[
26+
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\armeabi-v7a\symbol_folder_index.txt  ����2 a ���2[
2727
Y
28-
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  �؞�2� �����2
28+
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ����2� �����2

android/app/.cxx/Debug/6x714b3w/x86/configure_fingerprint.bin

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ C/C++ Structured Logk
22
i
33
gC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\additional_project_files.txtC
44
A
5-
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ˽؞�2  �����2h
5+
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2  �����2h
66
f
7-
dC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\android_gradle_build.json  ˽؞�2� �����2m
7+
dC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\android_gradle_build.json  �����2� �����2m
88
k
9-
iC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\android_gradle_build_mini.json  ˽؞�2� �����2Z
9+
iC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\android_gradle_build_mini.json  �����2� �����2Z
1010
X
11-
VC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\build.ninja  ˽؞�2�� �����2^
11+
VC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\build.ninja  �����2�� �����2^
1212
\
13-
ZC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\build.ninja.txt  ˽؞�2c
13+
ZC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\build.ninja.txt  �����2c
1414
a
15-
_C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\build_file_index.txt  ˽؞�2W �����2d
15+
_C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\build_file_index.txt  �����2W �����2d
1616
b
17-
`C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\compile_commands.json  ˽؞�2h
17+
`C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\compile_commands.json  �����2h
1818
f
19-
dC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\compile_commands.json.bin  ˽؞�2 n
19+
dC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\compile_commands.json.bin  �����2 n
2020
l
21-
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\metadata_generation_command.txt  ˽؞�2
21+
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\metadata_generation_command.txt  �����2
2222
� �����2a
2323
_
24-
]C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\prefab_config.json  ˽؞�2 ( �����2f
24+
]C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\prefab_config.json  �����2 ( �����2f
2525
d
26-
bC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\symbol_folder_index.txt  ˽؞�2 Y �����2[
26+
bC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86\symbol_folder_index.txt  �����2 Y �����2[
2727
Y
28-
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ˽؞�2� �����2
28+
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  �����2� �����2

android/app/.cxx/Debug/6x714b3w/x86_64/configure_fingerprint.bin

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ C/C++ Structured Logn
22
l
33
jC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\additional_project_files.txtC
44
A
5-
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ��؞�2  �ʘ��2k
5+
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  �����2  �ʘ��2k
66
i
7-
gC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\android_gradle_build.json  ��؞�2� �ʘ��2p
7+
gC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\android_gradle_build.json  �����2� �ʘ��2p
88
n
9-
lC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\android_gradle_build_mini.json  ��؞�2� �ʘ��2]
9+
lC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\android_gradle_build_mini.json  �����2� �ʘ��2]
1010
[
11-
YC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\build.ninja  ��؞�2�� �ɘ��2a
11+
YC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\build.ninja  �����2�� �ɘ��2a
1212
_
13-
]C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\build.ninja.txt  ��؞�2f
13+
]C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\build.ninja.txt  �����2f
1414
d
15-
bC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\build_file_index.txt  ��؞�2W �ʘ��2g
15+
bC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\build_file_index.txt  �����2W �ʘ��2g
1616
e
17-
cC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\compile_commands.json  ��؞�2k
17+
cC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\compile_commands.json  �����2k
1818
i
19-
gC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\compile_commands.json.bin  ��؞�2 q
19+
gC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\compile_commands.json.bin  �����2 q
2020
o
21-
mC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\metadata_generation_command.txt  ��؞�2
21+
mC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\metadata_generation_command.txt  �����2
2222
� �ʘ��2d
2323
b
24-
`C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\prefab_config.json  ��؞�2 ( �ʘ��2i
24+
`C:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\prefab_config.json  �����2 ( �ʘ��2i
2525
g
26-
eC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\symbol_folder_index.txt  ��؞�2 \ �ʘ��2[
26+
eC:\Users\dingd\Documents\GitHub\floaty\android\app\.cxx\Debug\6x714b3w\x86_64\symbol_folder_index.txt  �����2 \ �ʘ��2[
2727
Y
28-
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  ��؞�2� �����2
28+
WC:\Users\dingd\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  �����2� �����2

lib/backend/login_api.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:get_it/get_it.dart';
1010
final LoginApi loginApi = GetIt.I<LoginApi>();
1111

1212
class LoginApi {
13-
late final Settings settings = settings;
1413
static const String baseUrl = 'https://www.floatplane.com/api';
1514
PackageInfo? packageInfo;
1615
String userAgent = 'FloatyClient/error, CFNetwork';

lib/frontend/screens/channel_screen.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ class _ChannelSelectorState extends State<ChannelSelector> {
13161316
width: 1,
13171317
height: 20,
13181318
margin: const EdgeInsets.symmetric(horizontal: 8),
1319-
color: Colors.grey,
1319+
color: Theme.of(context).colorScheme.surfaceContainer,
13201320
),
13211321
),
13221322
..._sortedChannels(widget.creator.channels ?? []).map((channel) {
@@ -1375,8 +1375,8 @@ class _ChannelSelectorState extends State<ChannelSelector> {
13751375
padding: const EdgeInsets.symmetric(horizontal: 4.0),
13761376
child: TextButton(
13771377
style: ButtonStyle(
1378-
backgroundColor:
1379-
WidgetStateProperty.all(Colors.grey[850]),
1378+
backgroundColor: WidgetStateProperty.all(
1379+
Theme.of(context).colorScheme.surfaceContainer),
13801380
shape: WidgetStateProperty.all(
13811381
RoundedRectangleBorder(
13821382
side: BorderSide(
@@ -1391,7 +1391,8 @@ class _ChannelSelectorState extends State<ChannelSelector> {
13911391
padding: WidgetStateProperty.all(
13921392
const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
13931393
),
1394-
foregroundColor: WidgetStateProperty.all(Colors.white),
1394+
foregroundColor: WidgetStateProperty.all(
1395+
Theme.of(context).textTheme.titleLarge?.color),
13951396
),
13961397
onPressed: () {
13971398
if (index == 0 && !widget.isRootChannel) {

lib/frontend/screens/settings_screen.dart

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class _AccountSettingsScreenState extends State<AccountSettingsScreen> {
216216
CircleAvatar(
217217
radius: 50,
218218
foregroundImage: CachedNetworkImageProvider(
219-
user?['selfUser']['profileImage']['path'],
219+
user?['selfUser']['profileImage']['path'] ?? '',
220220
),
221221
backgroundImage: AssetImage('assets/placeholder.png'),
222222
),
@@ -930,11 +930,12 @@ class _AppearanceSettingsScreenState extends State<AppearanceSettingsScreen> {
930930
valueListenable: box.listenable(),
931931
builder: (context, Box settingsBox, _) {
932932
final themeType =
933-
settingsBox.get('theme_type', defaultValue: 2) as int;
933+
settingsBox.get('theme_type', defaultValue: 1) as int;
934934
final src =
935935
settingsBox.get('material_source', defaultValue: 0) as int;
936936
final seed = settingsBox.get('material_seed_color',
937-
defaultValue: flavorPrimary) as int;
937+
defaultValue: (flavorPrimary?.toARGB32() ??
938+
Colors.blue.toARGB32())) as int;
938939
final dynamicMode = settingsBox.get('material_dynamic_mode',
939940
defaultValue: 0) as int;
940941
return ListView(
@@ -1011,8 +1012,8 @@ class _AppearanceSettingsScreenState extends State<AppearanceSettingsScreen> {
10111012
child: const Text('Cancel')),
10121013
TextButton(
10131014
onPressed: () {
1014-
settingsBox.put(
1015-
'material_seed_color', picker.value);
1015+
settingsBox.put('material_seed_color',
1016+
picker.toARGB32());
10161017
Navigator.pop(context);
10171018
},
10181019
child: const Text('OK'),
@@ -1032,8 +1033,10 @@ class _AppearanceSettingsScreenState extends State<AppearanceSettingsScreen> {
10321033
title: const Text('Follow System'),
10331034
value: 0,
10341035
groupValue: dynamicMode,
1035-
onChanged: (v) =>
1036-
settingsBox.put('material_dynamic_mode', v!),
1036+
onChanged: (v) {
1037+
settingsBox.put('material_dynamic_mode', v!);
1038+
print(settingsBox.path);
1039+
},
10371040
),
10381041
RadioListTile<int>(
10391042
title: const Text('Force Light'),

lib/main.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import 'package:floaty/frontend/screens/live_screen.dart';
2020
import 'package:floaty/frontend/root.dart';
2121
import 'package:floaty/services/system/single_instance_service.dart';
2222
import 'package:floaty/services/system/tray_service.dart';
23+
import 'package:path_provider/path_provider.dart';
2324
import 'package:window_manager/window_manager.dart';
2425
import 'dart:io' show Platform, exit;
2526
import 'package:media_kit/media_kit.dart';
@@ -35,7 +36,8 @@ late final Color? flavorPrimary;
3536

3637
void main() async {
3738
WidgetsFlutterBinding.ensureInitialized();
38-
await Hive.initFlutter();
39+
final dir = await getApplicationSupportDirectory();
40+
await Hive.initFlutter(dir.path);
3941
await Hive.openBox('settings');
4042
const flavor =
4143
String.fromEnvironment('FLUTTER_FLAVOR', defaultValue: 'release');
@@ -417,11 +419,12 @@ class MyApp extends StatelessWidget {
417419
valueListenable: box.listenable(),
418420
builder: (_, Box settingsBox, __) {
419421
final themeType =
420-
settingsBox.get('theme_type', defaultValue: 2) as int;
422+
settingsBox.get('theme_type', defaultValue: 1) as int;
421423
final src =
422424
settingsBox.get('material_source', defaultValue: 0) as int;
423425
final seed = settingsBox.get('material_seed_color',
424-
defaultValue: Colors.blue.value) as int;
426+
defaultValue: flavorPrimary);
427+
425428
late ThemeMode themeMode;
426429
late ThemeData lightTheme;
427430
late ThemeData darkTheme;

lib/settings.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ final Settings settings = GetIt.I<Settings>();
77

88
class Settings {
99
Future<Box> _getBox() async {
10+
final dir = await getApplicationSupportDirectory();
11+
Hive.init(dir.path);
1012
return await Hive.openBox('settings');
1113
}
1214

0 commit comments

Comments
 (0)