mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
Ensure themes path is loaded, use testing theme name instead of UUID
This commit is contained in:
parent
16a3020d91
commit
707dc204c5
2 changed files with 6 additions and 3 deletions
|
@ -370,6 +370,10 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
|
||||||
.loadLocale(notify: false);
|
.loadLocale(notify: false);
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
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(
|
ref.read(themeProvider.state).state = StackTheme.fromJson(
|
||||||
json: darkJson,
|
json: darkJson,
|
||||||
applicationThemesDirectoryPath: ref.read(
|
applicationThemesDirectoryPath: ref.read(
|
||||||
|
|
|
@ -1661,7 +1661,8 @@ class StackTheme {
|
||||||
assets: ThemeAssets.fromJson(
|
assets: ThemeAssets.fromJson(
|
||||||
json: json,
|
json: json,
|
||||||
applicationThemesDirectoryPath: applicationThemesDirectoryPath,
|
applicationThemesDirectoryPath: applicationThemesDirectoryPath,
|
||||||
internalThemeUuid: _id,
|
internalThemeUuid:
|
||||||
|
"dark", //TODO - Replace this with the uuid (_id) once setup
|
||||||
),
|
),
|
||||||
overlayInt: parseColor(json["overlay"] as String),
|
overlayInt: parseColor(json["overlay"] as String),
|
||||||
accentColorBlueInt:
|
accentColorBlueInt:
|
||||||
|
@ -2060,8 +2061,6 @@ class ThemeAssets {
|
||||||
required String applicationThemesDirectoryPath,
|
required String applicationThemesDirectoryPath,
|
||||||
required String internalThemeUuid,
|
required String internalThemeUuid,
|
||||||
}) {
|
}) {
|
||||||
print(
|
|
||||||
"ASSETS JSON IS ${jsonEncode(json["assets"]["svg"]['coin_icons']['small'])}");
|
|
||||||
return ThemeAssets(
|
return ThemeAssets(
|
||||||
bellNew:
|
bellNew:
|
||||||
"$applicationThemesDirectoryPath/$internalThemeUuid/${json["assets"]["svg"]["bell_new"] as String}",
|
"$applicationThemesDirectoryPath/$internalThemeUuid/${json["assets"]["svg"]["bell_new"] as String}",
|
||||||
|
|
Loading…
Reference in a new issue