fix: some theme issues

This commit is contained in:
julian 2023-06-05 16:25:41 -06:00
parent 79b403a51b
commit 84ab43ced1
4 changed files with 32 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -1517,7 +1517,7 @@ class StackTheme {
themeId: json["id"] as String, themeId: json["id"] as String,
) )
: null : null
..assetsV2 = version == 2 ..assetsV2 = version >= 2
? ThemeAssetsV2.fromJson( ? ThemeAssetsV2.fromJson(
json: Map<String, dynamic>.from(json["assets"] as Map), json: Map<String, dynamic>.from(json["assets"] as Map),
applicationThemesDirectoryPath: applicationThemesDirectoryPath, applicationThemesDirectoryPath: applicationThemesDirectoryPath,
@ -2222,6 +2222,36 @@ class ThemeAssetsV2 implements IThemeAssets {
return result; return result;
} }
@override
String toString() {
return 'ThemeAssetsV2('
'bellNew: $bellNew, '
'buy: $buy, '
'exchange: $exchange, '
'personaIncognito: $personaIncognito, '
'personaEasy: $personaEasy, '
'stack: $stack, '
'stackIcon: $stackIcon, '
'receive: $receive, '
'receivePending: $receivePending, '
'receiveCancelled: $receiveCancelled, '
'send: $send, '
'sendPending: $sendPending, '
'sendCancelled: $sendCancelled, '
'themeSelector: $themeSelector, '
'themePreview: $themePreview, '
'txExchange: $txExchange, '
'txExchangePending: $txExchangePending, '
'txExchangeFailed: $txExchangeFailed, '
'loadingGif: $loadingGif, '
'background: $background, '
'coinPlaceholder: $coinPlaceholder, '
'coinIcons: $coinIcons, '
'coinImages: $coinImages, '
'coinSecondaryImages: $coinSecondaryImages'
')';
}
} }
abstract class IThemeAssets { abstract class IThemeAssets {

View file

@ -177,7 +177,7 @@ class ThemeToggle extends ConsumerStatefulWidget {
class _ThemeToggle extends ConsumerState<ThemeToggle> { class _ThemeToggle extends ConsumerState<ThemeToggle> {
late final StreamSubscription<void> _subscription; late final StreamSubscription<void> _subscription;
late int _current; int _current = 0;
List<Tuple3<String, String, String>> installedThemeIdNames = []; List<Tuple3<String, String, String>> installedThemeIdNames = [];