Ensure themes path is loaded, use testing theme name instead of UUID

This commit is contained in:
likho 2023-04-26 14:26:35 +02:00
parent 16a3020d91
commit 707dc204c5
2 changed files with 6 additions and 3 deletions

View file

@ -370,6 +370,10 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
.loadLocale(notify: false);
WidgetsBinding.instance.addPostFrameCallback((_) async {
//Add themes path to provider
ref.read(applicationThemesDirectoryPathProvider.notifier).state =
(await StackFileSystem.applicationThemesDirectory()).path;
ref.read(themeProvider.state).state = StackTheme.fromJson(
json: darkJson,
applicationThemesDirectoryPath: ref.read(

View file

@ -1661,7 +1661,8 @@ class StackTheme {
assets: ThemeAssets.fromJson(
json: json,
applicationThemesDirectoryPath: applicationThemesDirectoryPath,
internalThemeUuid: _id,
internalThemeUuid:
"dark", //TODO - Replace this with the uuid (_id) once setup
),
overlayInt: parseColor(json["overlay"] as String),
accentColorBlueInt:
@ -2060,8 +2061,6 @@ class ThemeAssets {
required String applicationThemesDirectoryPath,
required String internalThemeUuid,
}) {
print(
"ASSETS JSON IS ${jsonEncode(json["assets"]["svg"]['coin_icons']['small'])}");
return ThemeAssets(
bellNew:
"$applicationThemesDirectoryPath/$internalThemeUuid/${json["assets"]["svg"]["bell_new"] as String}",