resolve json errors, move assets json into themes json

This commit is contained in:
likho 2023-04-24 19:36:05 +02:00
parent c6ffe14a4e
commit d42f48ceee
3 changed files with 246 additions and 263 deletions

View file

@ -1,53 +0,0 @@
final Map<String, dynamic> darkThemeAssets = {
"assets": {
"name": "dark",
"svg": {
"background": "",
"coin_icons": {
"small": {
"bitcoin ": "svg/coin_icons/small/Bitcoin.svg",
"litecoin ": "svg/coin_icons/small/Litecoin.svg",
"bitcoincash ": "svg/coin_icons/small/Bitcoincash.svg",
"dogecoin ": "svg/coin_icons/small/Dogecoin.svg",
"epicCash ": "svg/coin_icons/small/EpicCash.svg",
"ethereum ": "svg/coin_icons/small/Ethereum.svg",
"firo ": "svg/coin_icons/small/Firo.svg",
"monero ": "svg/coin_icons/small/Monero.svg",
"wownero ": "svg/coin_icons/small/Wownero.svg",
"namecoin ": "svg/coin_icons/small/Namecoin.svg",
"particl ": "svg/coin_icons/small/Particl.svg",
},
"big": {
"bitcoin ": "svg/coin_icons/big/bitcoin.svg",
"litecoin ": "svg/coin_icons/big/litecoin.svg",
"bitcoincash ": "svg/coin_icons/big/bitcoincash.svg",
"dogecoin ": "svg/coin_icons/big/doge.svg",
"epicCash ": "svg/coin_icons/big/epic-cash.svg",
"ethereum ": "svg/coin_icons/big/ethereum.svg",
"firo ": "svg/coin_icons/big/firo.svg",
"monero ": "svg/coin_icons/big/monero.svg",
"wownero ": "svg/coin_icons/big/wownero.svg",
"namecoin ": "svg/coin_icons/big/namecoin.svg",
"particl ": "svg/coin_icons/big/particl.svg",
}
},
"bell_new": "svg/bell-new.svg",
"persona_incognito": "svg/persona-incognito-1.svg",
"persona_easy": "svg/persona-easy-1.svg",
"stack": "svg/stack.svg",
"stack_icon": "svg/stack-icon1.svg",
"receive": "svg/tx-icon-receive.svg",
"receive_pending": "svg/tx-icon-receive-pending.svg",
"receive_cancelled": "svg/tx-icon-receive-failed.svg",
"send": "svg/tx-icon-send.svg",
"send_pending": "svg/tx-icon-send-pending.svg",
"send_cancelled": "svg/tx-icon-send-failed.svg",
"theme_dark": "svg/dark-theme.svg",
"theme_dark_chan": "svg/darkChansTheme.svg",
},
"png": {
"chan_persona_easy": "images/chan-persona-easy.png",
"chan_persona_incognito": "images/chan-persona-incognito.png"
}
}
};

View file

@ -9,8 +9,6 @@ import 'package:stackwallet/utilities/extensions/impl/string.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:uuid/uuid.dart';
import '../../assets/defaults/dark_theme_assets.dart';
@Collection(inheritance: false)
class StackTheme {
final String assetBundleUrl;
@ -1654,38 +1652,31 @@ class StackTheme {
: jsonEncode(json["box_shadows"]["home_view_button_bar"] as Map),
coinColorsJsonString: jsonEncode(json["colors"]['coin'] as Map),
assets: ThemeAssets.fromJson(
json: darkThemeAssets,
json: json,
applicationThemesDirectoryPath: applicationThemesDirectoryPath,
internalThemeUuid: _id,
),
overlayInt: parseColor(json["colors"]["overlay"] as String),
overlayInt: parseColor(json["overlay"] as String),
accentColorBlueInt:
parseColor(json["colors"]["accent_colors"]["blue"] as String),
parseColor(json["colors"]["accent"]["blue"] as String),
accentColorGreenInt:
parseColor(json["colors"]["accent_colors"]["green"] as String),
parseColor(json["colors"]["accent"]["green"] as String),
accentColorYellowInt:
parseColor(json["colors"]["accent_colors"]["yellow"] as String),
accentColorRedInt:
parseColor(json["colors"]["accent_colors"]["red"] as String),
parseColor(json["colors"]["accent"]["yellow"] as String),
accentColorRedInt: parseColor(json["colors"]["accent"]["red"] as String),
accentColorOrangeInt:
parseColor(json["colors"]["accent_colors"]["orange"] as String),
parseColor(json["colors"]["accent"]["orange"] as String),
accentColorDarkInt:
parseColor(json["colors"]["accent_colors"]["dark"] as String),
shadowInt: parseColor(json["colors"]["shadow"] as String),
textDarkInt:
parseColor(json["colors"]["text_colors"]["dark_one"] as String),
textDark2Int:
parseColor(json["colors"]["text_colors"]["dark_two"] as String),
textDark3Int:
parseColor(json["colors"]["text_colors"]["dark_three"] as String),
textWhiteInt:
parseColor(json["colors"]["text_colors"]["white"] as String),
parseColor(json["colors"]["accent"]["dark"] as String),
shadowInt: parseColor(json["shadow"] as String),
textDarkInt: parseColor(json["colors"]["text"]["dark_one"] as String),
textDark2Int: parseColor(json["colors"]["text"]["dark_two"] as String),
textDark3Int: parseColor(json["colors"]["text"]["dark_three"] as String),
textWhiteInt: parseColor(json["colors"]["text"]["white"] as String),
textFavoriteCardInt:
parseColor(json["colors"]["text_colors"]["favorite"] as String),
textErrorInt:
parseColor(json["colors"]["text_colors"]["error"] as String),
textRestoreInt:
parseColor(json["colors"]["text_colors"]["restore"] as String),
parseColor(json["colors"]["text"]["favorite"] as String),
textErrorInt: parseColor(json["colors"]["text"]["error"] as String),
textRestoreInt: parseColor(json["colors"]["text"]["restore"] as String),
buttonBackPrimaryInt:
parseColor(json["colors"]["button_back_colors"]["primary"] as String),
buttonBackSecondaryInt: parseColor(
@ -1708,247 +1699,229 @@ class StackTheme {
parseColor(json["colors"]["button_back_colors"]["numpad"] as String),
bottomNavBackInt:
parseColor(json["colors"]["button_back_colors"]["nav"] as String),
textSubtitle1Int: parseColor(
json["colors"]["text_subtitles"]["subtitle_one"] as String),
textSubtitle2Int: parseColor(
json["colors"]["text_subtitles"]["subtitle_two"] as String),
textSubtitle3Int: parseColor(
json["colors"]["text_subtitles"]["subtitle_three"] as String),
textSubtitle4Int: parseColor(
json["colors"]["text_subtitles"]["subtitle_four"] as String),
textSubtitle5Int: parseColor(
json["colors"]["text_subtitles"]["subtitle_five"] as String),
textSubtitle6Int: parseColor(
json["colors"]["text_subtitles"]["subtitle_six"] as String),
textSubtitle1Int:
parseColor(json["text_subtitles"]["subtitle_one"] as String),
textSubtitle2Int:
parseColor(json["text_subtitles"]["subtitle_two"] as String),
textSubtitle3Int:
parseColor(json["text_subtitles"]["subtitle_three"] as String),
textSubtitle4Int:
parseColor(json["text_subtitles"]["subtitle_four"] as String),
textSubtitle5Int:
parseColor(json["text_subtitles"]["subtitle_five"] as String),
textSubtitle6Int:
parseColor(json["text_subtitles"]["subtitle_six"] as String),
buttonTextPrimaryInt:
parseColor(json["colors"]["button_text"]["primary"] as String),
buttonTextSecondaryInt: parseColor(
json["colors"]["button_text_colors"]["secondary"] as String),
buttonTextSecondaryInt:
parseColor(json["colors"]["button_text"]["secondary"] as String),
buttonTextPrimaryDisabledInt: parseColor(
json["colors"]["button_text_colors"]["primary_disabled"] as String),
json["colors"]["button_text"]["primary_disabled"] as String),
buttonTextSecondaryDisabledInt: parseColor(
json["colors"]["button_text_colors"]["secondary_disabled"] as String),
json["colors"]["button_text"]["secondary_disabled"] as String),
buttonTextBorderInt:
parseColor(json["colors"]["button_text_colors"]["border"] as String),
buttonTextDisabledInt: parseColor(
json["colors"]["button_text_colors"]["disabled"] as String),
buttonTextBorderlessInt: parseColor(
json["colors"]["button_text_colors"]["borderless"] as String),
buttonTextBorderlessDisabledInt: parseColor(json["colors"]
["button_text_colors"]["borderless_disabled"] as String),
numberTextDefaultInt:
parseColor(json["colors"]["number_text_default"] as String),
numpadTextDefaultInt:
parseColor(json["colors"]["numpad_text_default"] as String),
bottomNavTextInt: parseColor(json["colors"]["bottom_nav_text"] as String),
customTextButtonEnabledTextInt: parseColor(
json["colors"]["custom_text_button_enabled_text"] as String),
customTextButtonDisabledTextInt: parseColor(
json["colors"]["custom_text_button_disabled_text"] as String),
switchBGOnInt:
parseColor(json["colors"]["switch_colors"]["bg_on"] as String),
switchBGOffInt:
parseColor(json["colors"]["switch_colors"]["bg_off"] as String),
parseColor(json["colors"]["button_text"]["border"] as String),
buttonTextDisabledInt:
parseColor(json["colors"]["button_text"]["disabled"] as String),
buttonTextBorderlessInt:
parseColor(json["colors"]["button_text"]["borderless"] as String),
buttonTextBorderlessDisabledInt: parseColor(
json["colors"]["button_text"]["borderless_disabled"] as String),
numberTextDefaultInt: parseColor(json["number_text_default"] as String),
numpadTextDefaultInt: parseColor(json["numpad_text_default"] as String),
bottomNavTextInt: parseColor(json["bottom_nav_text"] as String),
customTextButtonEnabledTextInt:
parseColor(json["custom_text_button_enabled_text"] as String),
customTextButtonDisabledTextInt:
parseColor(json["custom_text_button_disabled_text"] as String),
switchBGOnInt: parseColor(json["colors"]["switch"]["bg_on"] as String),
switchBGOffInt: parseColor(json["colors"]["switch"]["bg_off"] as String),
switchBGDisabledInt:
parseColor(json["colors"]["switch_colors"]["bg_disabled"] as String),
parseColor(json["colors"]["switch"]["bg_disabled"] as String),
switchCircleOnInt:
parseColor(json["colors"]["switch_colors"]["circle_on"] as String),
parseColor(json["colors"]["switch"]["circle_on"] as String),
switchCircleOffInt:
parseColor(json["colors"]["switch_colors"]["circle_off"] as String),
switchCircleDisabledInt: parseColor(
json["colors"]["switch_colors"]["circle_disabled"] as String),
parseColor(json["colors"]["switch"]["circle_off"] as String),
switchCircleDisabledInt:
parseColor(json["colors"]["switch"]["circle_disabled"] as String),
stepIndicatorBGCheckInt:
parseColor(json["colors"]["step_indicator"]["bg_check"] as String),
parseColor(json["step_indicator"]["bg_check"] as String),
stepIndicatorBGNumberInt:
parseColor(json["colors"]["step_indicator"]["bg_number"] as String),
parseColor(json["step_indicator"]["bg_number"] as String),
stepIndicatorBGInactiveInt:
parseColor(json["colors"]["step_indicator"]["bg_inactive"] as String),
parseColor(json["step_indicator"]["bg_inactive"] as String),
stepIndicatorBGLinesInt:
parseColor(json["colors"]["step_indicator"]["bg_lines"] as String),
stepIndicatorBGLinesInactiveInt: parseColor(
json["colors"]["step_indicator"]["bg_lines_inactive"] as String),
parseColor(json["step_indicator"]["bg_lines"] as String),
stepIndicatorBGLinesInactiveInt:
parseColor(json["step_indicator"]["bg_lines_inactive"] as String),
stepIndicatorIconTextInt:
parseColor(json["colors"]["step_indicator"]["icon_text"] as String),
parseColor(json["step_indicator"]["icon_text"] as String),
stepIndicatorIconNumberInt:
parseColor(json["colors"]["step_indicator"]["icon_number"] as String),
stepIndicatorIconInactiveInt: parseColor(
json["colors"]["step_indicator"]["icon_inactive"] as String),
parseColor(json["step_indicator"]["icon_number"] as String),
stepIndicatorIconInactiveInt:
parseColor(json["step_indicator"]["icon_inactive"] as String),
checkboxBGCheckedInt:
parseColor(json["colors"]["checkbox"]["bg_checked"] as String),
parseColor(json["checkbox"]["bg_checked"] as String),
checkboxBorderEmptyInt:
parseColor(json["colors"]["checkbox"]["border_empty"] as String),
parseColor(json["checkbox"]["border_empty"] as String),
checkboxBGDisabledInt:
parseColor(json["colors"]["checkbox"]["bg_disabled"] as String),
parseColor(json["checkbox"]["bg_disabled"] as String),
checkboxIconCheckedInt:
parseColor(json["colors"]["checkbox"]["icon_checked"] as String),
parseColor(json["checkbox"]["icon_checked"] as String),
checkboxIconDisabledInt:
parseColor(json["colors"]["checkbox"]["icon_disabled"] as String),
parseColor(json["checkbox"]["icon_disabled"] as String),
checkboxTextLabelInt:
parseColor(json["colors"]["checkbox"]["text_label"] as String),
parseColor(json["checkbox"]["text_label"] as String),
snackBarBackSuccessInt:
parseColor(json["colors"]["snack_bar"]["back_success"] as String),
parseColor(json["snack_bar"]["back_success"] as String),
snackBarBackErrorInt:
parseColor(json["colors"]["snack_bar"]["back_error"] as String),
snackBarBackInfoInt:
parseColor(json["colors"]["snack_bar"]["back_info"] as String),
parseColor(json["snack_bar"]["back_error"] as String),
snackBarBackInfoInt: parseColor(json["snack_bar"]["back_info"] as String),
snackBarTextSuccessInt:
parseColor(json["colors"]["snack_bar"]["text_success"] as String),
parseColor(json["snack_bar"]["text_success"] as String),
snackBarTextErrorInt:
parseColor(json["colors"]["snack_bar"]["text_error"] as String),
snackBarTextInfoInt:
parseColor(json["colors"]["snack_bar"]["text_info"] as String),
parseColor(json["snack_bar"]["text_error"] as String),
snackBarTextInfoInt: parseColor(json["snack_bar"]["text_info"] as String),
bottomNavIconBackInt:
parseColor(json["colors"]["icons"]["bottom_nav_icon_back"] as String),
parseColor(json["icons"]["bottom_nav_icon_back"] as String),
bottomNavIconIconInt:
parseColor(json["colors"]["icons"]["bottom_nav_icon_icon"] as String),
parseColor(json["icons"]["bottom_nav_icon_icon"] as String),
topNavIconPrimaryInt:
parseColor(json["colors"]["icons"]["top_nav_icon_primary"] as String),
parseColor(json["icons"]["top_nav_icon_primary"] as String),
topNavIconGreenInt:
parseColor(json["colors"]["icons"]["top_nav_icon_green"] as String),
parseColor(json["icons"]["top_nav_icon_green"] as String),
topNavIconYellowInt:
parseColor(json["colors"]["icons"]["top_nav_icon_yellow"] as String),
topNavIconRedInt:
parseColor(json["colors"]["icons"]["top_nav_icon_red"] as String),
parseColor(json["icons"]["top_nav_icon_yellow"] as String),
topNavIconRedInt: parseColor(json["icons"]["top_nav_icon_red"] as String),
settingsIconBackInt:
parseColor(json["colors"]["icons"]["settings_icon_back"] as String),
parseColor(json["icons"]["settings_icon_back"] as String),
settingsIconIconInt:
parseColor(json["colors"]["icons"]["settings_icon_icon"] as String),
settingsIconBack2Int: parseColor(
json["colors"]["icons"]["settings_icon_back_two"] as String),
settingsIconElementInt: parseColor(
json["colors"]["icons"]["settings_icon_element"] as String),
parseColor(json["icons"]["settings_icon_icon"] as String),
settingsIconBack2Int:
parseColor(json["icons"]["settings_icon_back_two"] as String),
settingsIconElementInt:
parseColor(json["icons"]["settings_icon_element"] as String),
textFieldActiveBGInt:
parseColor(json["colors"]["text_field"]["active_bg"] as String),
parseColor(json["text_field"]["active_bg"] as String),
textFieldDefaultBGInt:
parseColor(json["colors"]["text_field"]["default_bg"] as String),
textFieldErrorBGInt:
parseColor(json["colors"]["text_field"]["error_bg"] as String),
parseColor(json["text_field"]["default_bg"] as String),
textFieldErrorBGInt: parseColor(json["text_field"]["error_bg"] as String),
textFieldSuccessBGInt:
parseColor(json["colors"]["text_field"]["success_bg"] as String),
parseColor(json["text_field"]["success_bg"] as String),
textFieldErrorBorderInt:
parseColor(json["colors"]["text_field"]["error_border"] as String),
parseColor(json["text_field"]["error_border"] as String),
textFieldSuccessBorderInt:
parseColor(json["colors"]["text_field"]["success_border"] as String),
textFieldActiveSearchIconLeftInt: parseColor(
json["colors"]["text_field"]["active_search_icon_left"] as String),
textFieldDefaultSearchIconLeftInt: parseColor(
json["colors"]["text_field"]["default_search_icon_left"] as String),
textFieldErrorSearchIconLeftInt: parseColor(
json["colors"]["text_field"]["error_search_icon_left"] as String),
textFieldSuccessSearchIconLeftInt: parseColor(
json["colors"]["text_field"]["success_search_icon_left"] as String),
parseColor(json["text_field"]["success_border"] as String),
textFieldActiveSearchIconLeftInt:
parseColor(json["text_field"]["active_search_icon_left"] as String),
textFieldDefaultSearchIconLeftInt:
parseColor(json["text_field"]["default_search_icon_left"] as String),
textFieldErrorSearchIconLeftInt:
parseColor(json["text_field"]["error_search_icon_left"] as String),
textFieldSuccessSearchIconLeftInt:
parseColor(json["text_field"]["success_search_icon_left"] as String),
textFieldActiveTextInt:
parseColor(json["colors"]["text_field"]["active_text"] as String),
parseColor(json["text_field"]["active_text"] as String),
textFieldDefaultTextInt:
parseColor(json["colors"]["text_field"]["default_text"] as String),
parseColor(json["text_field"]["default_text"] as String),
textFieldErrorTextInt:
parseColor(json["colors"]["text_field"]["error_text"] as String),
parseColor(json["text_field"]["error_text"] as String),
textFieldSuccessTextInt:
parseColor(json["colors"]["text_field"]["success_text"] as String),
parseColor(json["text_field"]["success_text"] as String),
textFieldActiveLabelInt:
parseColor(json["colors"]["text_field"]["active_label"] as String),
parseColor(json["text_field"]["active_label"] as String),
textFieldErrorLabelInt:
parseColor(json["colors"]["text_field"]["error_label"] as String),
parseColor(json["text_field"]["error_label"] as String),
textFieldSuccessLabelInt:
parseColor(json["colors"]["text_field"]["success_label"] as String),
textFieldActiveSearchIconRightInt: parseColor(
json["colors"]["text_field"]["active_search_icon_right"] as String),
textFieldDefaultSearchIconRightInt: parseColor(
json["colors"]["text_field"]["default_search_icon_right"] as String),
textFieldErrorSearchIconRightInt: parseColor(
json["colors"]["text_field"]["error_search_icon_right"] as String),
textFieldSuccessSearchIconRightInt: parseColor(
json["colors"]["text_field"]["success_search_icon_right"] as String),
settingsItem2ActiveBGInt: parseColor(
json["colors"]["settings_item_level_two"]["active_bg"] as String),
settingsItem2ActiveTextInt: parseColor(
json["colors"]["settings_item_level_two"]["active_text"] as String),
settingsItem2ActiveSubInt: parseColor(
json["colors"]["settings_item_level_two"]["active_sub"] as String),
parseColor(json["text_field"]["success_label"] as String),
textFieldActiveSearchIconRightInt:
parseColor(json["text_field"]["active_search_icon_right"] as String),
textFieldDefaultSearchIconRightInt:
parseColor(json["text_field"]["default_search_icon_right"] as String),
textFieldErrorSearchIconRightInt:
parseColor(json["text_field"]["error_search_icon_right"] as String),
textFieldSuccessSearchIconRightInt:
parseColor(json["text_field"]["success_search_icon_right"] as String),
settingsItem2ActiveBGInt:
parseColor(json["settings_item_level_two"]["active_bg"] as String),
settingsItem2ActiveTextInt:
parseColor(json["settings_item_level_two"]["active_text"] as String),
settingsItem2ActiveSubInt:
parseColor(json["settings_item_level_two"]["active_sub"] as String),
radioButtonIconBorderInt:
parseColor(json["colors"]["radio_button"]["icon_border"] as String),
radioButtonIconBorderDisabledInt: parseColor(
json["colors"]["radio_button"]["icon_border_disabled"] as String),
radioButtonBorderEnabledInt: parseColor(
json["colors"]["radio_button"]["border_enabled"] as String),
radioButtonBorderDisabledInt: parseColor(
json["colors"]["radio_button"]["border_disabled"] as String),
parseColor(json["radio_button"]["icon_border"] as String),
radioButtonIconBorderDisabledInt:
parseColor(json["radio_button"]["icon_border_disabled"] as String),
radioButtonBorderEnabledInt:
parseColor(json["radio_button"]["border_enabled"] as String),
radioButtonBorderDisabledInt:
parseColor(json["radio_button"]["border_disabled"] as String),
radioButtonIconCircleInt:
parseColor(json["colors"]["radio_button"]["icon_circle"] as String),
parseColor(json["radio_button"]["icon_circle"] as String),
radioButtonIconEnabledInt:
parseColor(json["colors"]["radio_button"]["icon_circle"] as String),
parseColor(json["radio_button"]["icon_circle"] as String),
radioButtonTextEnabledInt:
parseColor(json["colors"]["radio_button"]["text_enabled"] as String),
parseColor(json["radio_button"]["text_enabled"] as String),
radioButtonTextDisabledInt:
parseColor(json["colors"]["radio_button"]["text_disabled"] as String),
parseColor(json["radio_button"]["text_disabled"] as String),
radioButtonLabelEnabledInt:
parseColor(json["colors"]["radio_button"]["label_enabled"] as String),
radioButtonLabelDisabledInt: parseColor(
json["colors"]["radio_button"]["label_disabled"] as String),
infoItemBGInt:
parseColor(json["colors"]["info_text"]["item_bg"] as String),
infoItemLabelInt:
parseColor(json["colors"]["info_text"]["item_label"] as String),
infoItemTextInt:
parseColor(json["colors"]["info_text"]["item_text"] as String),
infoItemIconsInt:
parseColor(json["colors"]["info_text"]["item_icons"] as String),
popupBGInt: parseColor(json["colors"]["popup_bg"] as String),
parseColor(json["radio_button"]["label_enabled"] as String),
radioButtonLabelDisabledInt:
parseColor(json["radio_button"]["label_disabled"] as String),
infoItemBGInt: parseColor(json["info_text"]["item_bg"] as String),
infoItemLabelInt: parseColor(json["info_text"]["item_label"] as String),
infoItemTextInt: parseColor(json["info_text"]["item_text"] as String),
infoItemIconsInt: parseColor(json["info_text"]["item_icons"] as String),
popupBGInt: parseColor(json["popup_bg"] as String),
currencyListItemBGInt:
parseColor(json["colors"]["currency_list_item_bg"] as String),
stackWalletBGInt:
parseColor(json["colors"]["bottom_nav"]["sw_bg"] as String),
stackWalletMidInt:
parseColor(json["colors"]["bottom_nav"]["sw_mid"] as String),
parseColor(json["currency_list_item_bg"] as String),
stackWalletBGInt: parseColor(json["bottom_nav"]["sw_bg"] as String),
stackWalletMidInt: parseColor(json["bottom_nav"]["sw_mid"] as String),
stackWalletBottomInt:
parseColor(json["colors"]["bottom_nav"]["sw_bottom"] as String),
bottomNavShadowInt:
parseColor(json["colors"]["bottom_nav"]["shadow"] as String),
splashInt: parseColor(json["colors"]["bottom_nav"]["splash"] as String),
highlightInt:
parseColor(json["colors"]["bottom_nav"]["highlight"] as String),
warningForegroundInt: parseColor(
json["colors"]["bottom_nav"]["warning_foreground"] as String),
warningBackgroundInt: parseColor(
json["colors"]["bottom_nav"]["warning_background"] as String),
parseColor(json["bottom_nav"]["sw_bottom"] as String),
bottomNavShadowInt: parseColor(json["bottom_nav"]["shadow"] as String),
splashInt: parseColor(json["bottom_nav"]["splash"] as String),
highlightInt: parseColor(json["bottom_nav"]["highlight"] as String),
warningForegroundInt:
parseColor(json["bottom_nav"]["warning_foreground"] as String),
warningBackgroundInt:
parseColor(json["bottom_nav"]["warning_background"] as String),
loadingOverlayTextColorInt: parseColor(
json["colors"]["bottom_nav"]["loading_overlay_text_color"] as String),
myStackContactIconBGInt: parseColor(
json["colors"]["bottom_nav"]["my_stack_contact_icon_bg"] as String),
textConfirmTotalAmountInt: parseColor(
json["colors"]["bottom_nav"]["text_confirm_total_amount"] as String),
textSelectedWordTableItemInt: parseColor(json["colors"]["bottom_nav"]
["text_selected_word_table_iterm"] as String),
json["bottom_nav"]["loading_overlay_text_color"] as String),
myStackContactIconBGInt:
parseColor(json["bottom_nav"]["my_stack_contact_icon_bg"] as String),
textConfirmTotalAmountInt:
parseColor(json["bottom_nav"]["text_confirm_total_amount"] as String),
textSelectedWordTableItemInt: parseColor(
json["bottom_nav"]["text_selected_word_table_iterm"] as String),
favoriteStarActiveInt:
parseColor(json["colors"]["favorite_star"]["active"] as String),
parseColor(json["favorite_star"]["active"] as String),
favoriteStarInactiveInt:
parseColor(json["colors"]["favorite_star"]["inactive"] as String),
parseColor(json["favorite_star"]["inactive"] as String),
rateTypeToggleColorOnInt:
parseColor(json["colors"]["rate_type_toggle"]["color_on"] as String),
parseColor(json["rate_type_toggle"]["color_on"] as String),
rateTypeToggleColorOffInt:
parseColor(json["colors"]["rate_type_toggle"]["color_off"] as String),
rateTypeToggleDesktopColorOnInt: parseColor(
json["colors"]["rate_type_toggle"]["desktop_color_on"] as String),
rateTypeToggleDesktopColorOffInt: parseColor(
json["colors"]["rate_type_toggle"]["desktop_color_off"] as String),
ethTagTextInt:
parseColor(json["colors"]["token_view"]["eth_tag_text"] as String),
ethTagBGInt:
parseColor(json["colors"]["token_view"]["eth_tag_bg"] as String),
ethWalletTagTextInt: parseColor(
json["colors"]["token_view"]["eth_wallet_tag_text"] as String),
ethWalletTagBGInt: parseColor(
json["colors"]["token_view"]["eth_wallet_tag_bg"] as String),
parseColor(json["rate_type_toggle"]["color_off"] as String),
rateTypeToggleDesktopColorOnInt:
parseColor(json["rate_type_toggle"]["desktop_color_on"] as String),
rateTypeToggleDesktopColorOffInt:
parseColor(json["rate_type_toggle"]["desktop_color_off"] as String),
ethTagTextInt: parseColor(json["token_view"]["eth_tag_text"] as String),
ethTagBGInt: parseColor(json["token_view"]["eth_tag_bg"] as String),
ethWalletTagTextInt:
parseColor(json["token_view"]["eth_wallet_tag_text"] as String),
ethWalletTagBGInt:
parseColor(json["token_view"]["eth_wallet_tag_bg"] as String),
tokenSummaryTextPrimaryInt: parseColor(
json["colors"]["token_view"]["token_summary_text_primary"] as String),
tokenSummaryTextSecondaryInt: parseColor(json["colors"]["token_view"]
["token_summary_text_secondary"] as String),
tokenSummaryBGInt: parseColor(
json["colors"]["token_view"]["token_summary_bg"] as String),
tokenSummaryButtonBGInt: parseColor(
json["colors"]["token_view"]["token_summary_button_bg"] as String),
tokenSummaryIconInt: parseColor(
json["colors"]["token_view"]["token_summary_icon"] as String),
json["token_view"]["token_summary_text_primary"] as String),
tokenSummaryTextSecondaryInt: parseColor(
json["token_view"]["token_summary_text_secondary"] as String),
tokenSummaryBGInt:
parseColor(json["token_view"]["token_summary_bg"] as String),
tokenSummaryButtonBGInt:
parseColor(json["token_view"]["token_summary_button_bg"] as String),
tokenSummaryIconInt:
parseColor(json["token_view"]["token_summary_icon"] as String),
);
}
@ -2081,7 +2054,7 @@ class ThemeAssets {
required String internalThemeUuid,
}) {
print(
"ASSETS JSON IS ${jsonEncode(json["assets"]["svg"]['coin_icons']['small']['bitcoin'])}");
"ASSETS JSON IS ${jsonEncode(json["assets"]["svg"]['coin_icons']['small'])}");
return ThemeAssets(
bellNew:
"$applicationThemesDirectoryPath/$internalThemeUuid/${json["assets"]["svg"]["bell_new"] as String}",

View file

@ -55,6 +55,19 @@ final Map<String, dynamic> darkJson = {
"circle_off": "0xFFFFFFFF",
"circle_disabled": "0xFFFFFFFF"
},
"button_back_colors": {
"primary": "0xFF4C86E9",
"secondary": "0xFF444E5C",
"primary_disabled": "0xFF38517C",
"secondary_disabled": "0xFF3B3F46",
"border": "0xFF4C86E9",
"border_disabled": "0xFF314265",
"border_secondary": "0xFF444E5C",
"border_secondary_disabled": "0xFF3B3F46",
"number": "0xFF484B51",
"numpad": "0xFF4C86E9",
"nav": "0xFF3E4148",
},
},
"overlay": "0xFF111215",
"shadow": "0x0F2D3132",
@ -200,5 +213,55 @@ final Map<String, dynamic> darkJson = {
"spread_radius": 3.0,
"blur_radius": 4.0
}
},
"assets": {
"svg": {
"background": "",
"coin_icons": {
"small": {
"bitcoin": "svg/coin_icons/small/Bitcoin.svg",
"litecoin": "svg/coin_icons/small/Litecoin.svg",
"bitcoincash": "svg/coin_icons/small/Bitcoincash.svg",
"dogecoin": "svg/coin_icons/small/Dogecoin.svg",
"epicCash": "svg/coin_icons/small/EpicCash.svg",
"ethereum": "svg/coin_icons/small/Ethereum.svg",
"firo": "svg/coin_icons/small/Firo.svg",
"monero": "svg/coin_icons/small/Monero.svg",
"wownero": "svg/coin_icons/small/Wownero.svg",
"namecoin": "svg/coin_icons/small/Namecoin.svg",
"particl": "svg/coin_icons/small/Particl.svg",
},
"big": {
"bitcoin": "svg/coin_icons/big/bitcoin.svg",
"litecoin": "svg/coin_icons/big/litecoin.svg",
"bitcoincash": "svg/coin_icons/big/bitcoincash.svg",
"dogecoin": "svg/coin_icons/big/doge.svg",
"epicCash": "svg/coin_icons/big/epic-cash.svg",
"ethereum": "svg/coin_icons/big/ethereum.svg",
"firo": "svg/coin_icons/big/firo.svg",
"monero": "svg/coin_icons/big/monero.svg",
"wownero": "svg/coin_icons/big/wownero.svg",
"namecoin": "svg/coin_icons/big/namecoin.svg",
"particl": "svg/coin_icons/big/particl.svg",
}
},
"bell_new": "svg/bell-new.svg",
"persona_incognito": "svg/persona-incognito-1.svg",
"persona_easy": "svg/persona-easy-1.svg",
"stack": "svg/stack.svg",
"stack_icon": "svg/stack-icon1.svg",
"receive": "svg/tx-icon-receive.svg",
"receive_pending": "svg/tx-icon-receive-pending.svg",
"receive_cancelled": "svg/tx-icon-receive-failed.svg",
"send": "svg/tx-icon-send.svg",
"send_pending": "svg/tx-icon-send-pending.svg",
"send_cancelled": "svg/tx-icon-send-failed.svg",
"theme_dark": "svg/dark-theme.svg",
"theme_dark_chan": "svg/darkChansTheme.svg",
},
"png": {
"chan_persona_easy": "images/chan-persona-easy.png",
"chan_persona_incognito": "images/chan-persona-incognito.png"
}
}
};