stack_wallet/lib/models/isar/stack_theme.dart

2598 lines
85 KiB
Dart
Raw Normal View History

2023-05-26 21:21:16 +00:00
/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2023-05-26
*
*/
2023-04-18 16:46:04 +00:00
import 'dart:convert';
2023-07-04 00:46:58 +00:00
import 'dart:io';
2023-04-18 16:46:04 +00:00
import 'package:flutter/material.dart';
2023-04-18 15:15:52 +00:00
import 'package:isar/isar.dart';
2024-05-15 21:20:45 +00:00
import 'package:stackwallet/supported_coins.dart';
import 'package:stackwallet/utilities/extensions/impl/box_shadow.dart';
2023-04-18 16:46:04 +00:00
import 'package:stackwallet/utilities/extensions/impl/gradient.dart';
import 'package:stackwallet/utilities/extensions/impl/string.dart';
2024-05-14 16:26:03 +00:00
import 'package:stackwallet/utilities/logger.dart';
2023-07-04 00:25:18 +00:00
import 'package:stackwallet/utilities/stack_file_system.dart';
2023-04-18 15:15:52 +00:00
2023-06-07 20:57:15 +00:00
part 'stack_theme.g.dart';
2023-04-18 15:15:52 +00:00
@Collection(inheritance: false)
2023-04-20 15:32:50 +00:00
class StackTheme {
2023-05-09 15:26:19 +00:00
Id id = Isar.autoIncrement;
/// id of theme on themes server
@Index(unique: true, replace: true)
2023-05-18 18:52:48 +00:00
late final String themeId;
2023-05-09 15:26:19 +00:00
2023-04-18 15:15:52 +00:00
/// the theme name that will be displayed in app
2023-05-18 18:52:48 +00:00
late final String name;
2023-04-18 15:15:52 +00:00
// system brightness
2023-05-18 18:52:48 +00:00
late final String brightnessString;
2023-04-18 15:15:52 +00:00
/// convenience enum conversion for stored [brightnessString]
@ignore
Brightness get brightness {
switch (brightnessString) {
case "light":
return Brightness.light;
case "dark":
return Brightness.dark;
default:
2024-05-14 16:26:03 +00:00
// just return light instead of a possible crash causing error
2023-04-18 15:15:52 +00:00
return Brightness.light;
}
}
2023-04-18 16:46:04 +00:00
2023-04-19 18:11:51 +00:00
// ==== background =====================================================
@ignore
Color get background => _background ??= Color(backgroundInt);
@ignore
Color? _background;
2023-05-18 18:52:48 +00:00
late final int backgroundInt;
2023-04-19 18:11:51 +00:00
// ==== backgroundAppBar =====================================================
@ignore
Color get backgroundAppBar =>
_backgroundAppBar ??= Color(backgroundAppBarInt);
@ignore
Color? _backgroundAppBar;
2023-05-18 18:52:48 +00:00
late final int backgroundAppBarInt;
2023-04-19 18:11:51 +00:00
// ==== gradientBackground =====================================================
@ignore
2023-04-25 13:58:51 +00:00
Gradient? get gradientBackground {
if (gradientBackgroundString == null) {
_gradientBackground = null;
} else {
2023-04-19 18:11:51 +00:00
_gradientBackground ??= GradientExt.fromJson(
Map<String, dynamic>.from(
2023-04-25 13:58:51 +00:00
jsonDecode(gradientBackgroundString!) as Map,
2023-04-19 18:11:51 +00:00
),
);
2023-04-25 13:58:51 +00:00
}
return _gradientBackground;
}
2023-04-19 18:11:51 +00:00
@ignore
Gradient? _gradientBackground;
2023-05-18 18:52:48 +00:00
late final String? gradientBackgroundString;
2023-04-19 18:11:51 +00:00
2023-04-20 16:18:33 +00:00
// ==== boxShadows =====================================================
@ignore
2023-04-24 14:36:12 +00:00
BoxShadow get standardBoxShadow =>
_standardBoxShadow ??= BoxShadowExt.fromJson(
Map<String, dynamic>.from(
2023-04-24 14:36:12 +00:00
jsonDecode(standardBoxShadowString) as Map,
),
);
@ignore
2023-04-24 14:36:12 +00:00
BoxShadow? _standardBoxShadow;
2023-05-18 18:52:48 +00:00
late final String standardBoxShadowString;
2023-04-24 14:36:12 +00:00
@ignore
BoxShadow? get homeViewButtonBarBoxShadow {
if (homeViewButtonBarBoxShadowString == null) {
_homeViewButtonBarBoxShadow = null;
} else {
_homeViewButtonBarBoxShadow ??= BoxShadowExt.fromJson(
Map<String, dynamic>.from(
jsonDecode(homeViewButtonBarBoxShadowString!) as Map,
),
);
}
return _homeViewButtonBarBoxShadow;
}
@ignore
BoxShadow? _homeViewButtonBarBoxShadow;
2023-05-18 18:52:48 +00:00
late final String? homeViewButtonBarBoxShadowString;
2023-04-20 16:18:33 +00:00
2023-04-19 18:11:51 +00:00
// ==== overlay =====================================================
@ignore
Color get overlay => _overlay ??= Color(overlayInt);
@ignore
Color? _overlay;
2023-05-18 18:52:48 +00:00
late final int overlayInt;
2023-04-19 18:11:51 +00:00
// ==== accentColorBlue =====================================================
@ignore
Color get accentColorBlue => _accentColorBlue ??= Color(
2024-05-14 16:26:03 +00:00
accentColorBlueInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _accentColorBlue;
2023-05-18 18:52:48 +00:00
late final int accentColorBlueInt;
2023-04-19 18:11:51 +00:00
// ==== accentColorGreen =====================================================
@ignore
Color get accentColorGreen => _accentColorGreen ??= Color(
2024-05-14 16:26:03 +00:00
accentColorGreenInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _accentColorGreen;
2023-05-18 18:52:48 +00:00
late final int accentColorGreenInt;
2023-04-19 18:11:51 +00:00
// ==== accentColorYellow =====================================================
@ignore
Color get accentColorYellow => _accentColorYellow ??= Color(
2024-05-14 16:26:03 +00:00
accentColorYellowInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _accentColorYellow;
2023-05-18 18:52:48 +00:00
late final int accentColorYellowInt;
2023-04-19 18:11:51 +00:00
// ==== accentColorRed =====================================================
@ignore
Color get accentColorRed => _accentColorRed ??= Color(
2024-05-14 16:26:03 +00:00
accentColorRedInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _accentColorRed;
2023-05-18 18:52:48 +00:00
late final int accentColorRedInt;
2023-04-19 18:11:51 +00:00
// ==== accentColorOrange =====================================================
@ignore
Color get accentColorOrange => _accentColorOrange ??= Color(
2024-05-14 16:26:03 +00:00
accentColorOrangeInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _accentColorOrange;
2023-05-18 18:52:48 +00:00
late final int accentColorOrangeInt;
2023-04-19 18:11:51 +00:00
// ==== accentColorDark =====================================================
@ignore
Color get accentColorDark => _accentColorDark ??= Color(
2024-05-14 16:26:03 +00:00
accentColorDarkInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _accentColorDark;
2023-05-18 18:52:48 +00:00
late final int accentColorDarkInt;
2023-04-19 18:11:51 +00:00
// ==== shadow =====================================================
@ignore
Color get shadow => _shadow ??= Color(
2024-05-14 16:26:03 +00:00
shadowInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _shadow;
2023-05-18 18:52:48 +00:00
late final int shadowInt;
2023-04-19 18:11:51 +00:00
// ==== textDark =====================================================
@ignore
Color get textDark => _textDark ??= Color(
2024-05-14 16:26:03 +00:00
textDarkInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textDark;
2023-05-18 18:52:48 +00:00
late final int textDarkInt;
2023-04-19 18:11:51 +00:00
// ==== textDark2 =====================================================
@ignore
Color get textDark2 => _textDark2 ??= Color(
2024-05-14 16:26:03 +00:00
textDark2Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textDark2;
2023-05-18 18:52:48 +00:00
late final int textDark2Int;
2023-04-19 18:11:51 +00:00
// ==== textDark3 =====================================================
@ignore
Color get textDark3 => _textDark3 ??= Color(
2024-05-14 16:26:03 +00:00
textDark3Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textDark3;
2023-05-18 18:52:48 +00:00
late final int textDark3Int;
2023-04-19 18:11:51 +00:00
// ==== textSubtitle1 =====================================================
@ignore
Color get textSubtitle1 => _textSubtitle1 ??= Color(
2024-05-14 16:26:03 +00:00
textSubtitle1Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textSubtitle1;
2023-05-18 18:52:48 +00:00
late final int textSubtitle1Int;
2023-04-19 18:11:51 +00:00
// ==== textSubtitle2 =====================================================
@ignore
Color get textSubtitle2 => _textSubtitle2 ??= Color(
2024-05-14 16:26:03 +00:00
textSubtitle2Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textSubtitle2;
2023-05-18 18:52:48 +00:00
late final int textSubtitle2Int;
2023-04-19 18:11:51 +00:00
// ==== textSubtitle3 =====================================================
@ignore
Color get textSubtitle3 => _textSubtitle3 ??= Color(
2024-05-14 16:26:03 +00:00
textSubtitle3Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textSubtitle3;
2023-05-18 18:52:48 +00:00
late final int textSubtitle3Int;
2023-04-19 18:11:51 +00:00
// ==== textSubtitle4 =====================================================
@ignore
Color get textSubtitle4 => _textSubtitle4 ??= Color(
2024-05-14 16:26:03 +00:00
textSubtitle4Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textSubtitle4;
2023-05-18 18:52:48 +00:00
late final int textSubtitle4Int;
2023-04-19 18:11:51 +00:00
// ==== textSubtitle5 =====================================================
@ignore
Color get textSubtitle5 => _textSubtitle5 ??= Color(
2024-05-14 16:26:03 +00:00
textSubtitle5Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textSubtitle5;
2023-05-18 18:52:48 +00:00
late final int textSubtitle5Int;
2023-04-19 18:11:51 +00:00
// ==== textSubtitle6 =====================================================
@ignore
Color get textSubtitle6 => _textSubtitle6 ??= Color(
2024-05-14 16:26:03 +00:00
textSubtitle6Int,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textSubtitle6;
2023-05-18 18:52:48 +00:00
late final int textSubtitle6Int;
2023-04-19 18:11:51 +00:00
// ==== textWhite =====================================================
@ignore
Color get textWhite => _textWhite ??= Color(
2024-05-14 16:26:03 +00:00
textWhiteInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textWhite;
2023-05-18 18:52:48 +00:00
late final int textWhiteInt;
2023-04-19 18:11:51 +00:00
// ==== textFavoriteCard =====================================================
@ignore
Color get textFavoriteCard => _textFavoriteCard ??= Color(
2024-05-14 16:26:03 +00:00
textFavoriteCardInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textFavoriteCard;
2023-05-18 18:52:48 +00:00
late final int textFavoriteCardInt;
2023-04-19 18:11:51 +00:00
// ==== textError =====================================================
@ignore
Color get textError => _textError ??= Color(
2024-05-14 16:26:03 +00:00
textErrorInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textError;
2023-05-18 18:52:48 +00:00
late final int textErrorInt;
2023-04-19 18:11:51 +00:00
// ==== textRestore =====================================================
@ignore
Color get textRestore => _textRestore ??= Color(
2024-05-14 16:26:03 +00:00
textRestoreInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _textRestore;
2023-05-18 18:52:48 +00:00
late final int textRestoreInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackPrimary =====================================================
@ignore
Color get buttonBackPrimary => _buttonBackPrimary ??= Color(
2024-05-14 16:26:03 +00:00
buttonBackPrimaryInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonBackPrimary;
2023-05-18 18:52:48 +00:00
late final int buttonBackPrimaryInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackSecondary =====================================================
@ignore
Color get buttonBackSecondary => _buttonBackSecondary ??= Color(
2024-05-14 16:26:03 +00:00
buttonBackSecondaryInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonBackSecondary;
2023-05-18 18:52:48 +00:00
late final int buttonBackSecondaryInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackPrimaryDisabled =====================================================
@ignore
Color get buttonBackPrimaryDisabled => _buttonBackPrimaryDisabled ??= Color(
2024-05-14 16:26:03 +00:00
buttonBackPrimaryDisabledInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonBackPrimaryDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonBackPrimaryDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackSecondaryDisabled =====================================================
@ignore
Color get buttonBackSecondaryDisabled =>
_buttonBackSecondaryDisabled ??= Color(
buttonBackSecondaryDisabledInt,
);
@ignore
Color? _buttonBackSecondaryDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonBackSecondaryDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackBorder =====================================================
@ignore
Color get buttonBackBorder => _buttonBackBorder ??= Color(
2024-05-14 16:26:03 +00:00
buttonBackBorderInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonBackBorder;
2023-05-18 18:52:48 +00:00
late final int buttonBackBorderInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackBorderDisabled =====================================================
@ignore
Color get buttonBackBorderDisabled => _buttonBackBorderDisabled ??= Color(
2024-05-14 16:26:03 +00:00
buttonBackBorderDisabledInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonBackBorderDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonBackBorderDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackBorderSecondary =====================================================
@ignore
Color get buttonBackBorderSecondary => _buttonBackBorderSecondary ??= Color(
2024-05-14 16:26:03 +00:00
buttonBackBorderSecondaryInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonBackBorderSecondary;
2023-05-18 18:52:48 +00:00
late final int buttonBackBorderSecondaryInt;
2023-04-19 18:11:51 +00:00
// ==== buttonBackBorderSecondaryDisabled =====================================================
@ignore
Color get buttonBackBorderSecondaryDisabled =>
_buttonBackBorderSecondaryDisabled ??= Color(
buttonBackBorderSecondaryDisabledInt,
);
@ignore
Color? _buttonBackBorderSecondaryDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonBackBorderSecondaryDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== numberBackDefault =====================================================
@ignore
Color get numberBackDefault => _numberBackDefault ??= Color(
2024-05-14 16:26:03 +00:00
numberBackDefaultInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _numberBackDefault;
2023-05-18 18:52:48 +00:00
late final int numberBackDefaultInt;
2023-04-19 18:11:51 +00:00
// ==== numpadBackDefault =====================================================
@ignore
Color get numpadBackDefault => _numpadBackDefault ??= Color(
2024-05-14 16:26:03 +00:00
numpadBackDefaultInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _numpadBackDefault;
2023-05-18 18:52:48 +00:00
late final int numpadBackDefaultInt;
2023-04-19 18:11:51 +00:00
// ==== bottomNavBack =====================================================
@ignore
Color get bottomNavBack => _bottomNavBack ??= Color(
2024-05-14 16:26:03 +00:00
bottomNavBackInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _bottomNavBack;
2023-05-18 18:52:48 +00:00
late final int bottomNavBackInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextPrimary =====================================================
@ignore
Color get buttonTextPrimary => _buttonTextPrimary ??= Color(
2024-05-14 16:26:03 +00:00
buttonTextPrimaryInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonTextPrimary;
2023-05-18 18:52:48 +00:00
late final int buttonTextPrimaryInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextSecondary =====================================================
@ignore
Color get buttonTextSecondary => _buttonTextSecondary ??= Color(
2024-05-14 16:26:03 +00:00
buttonTextSecondaryInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonTextSecondary;
2023-05-18 18:52:48 +00:00
late final int buttonTextSecondaryInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextPrimaryDisabled =====================================================
@ignore
Color get buttonTextPrimaryDisabled => _buttonTextPrimaryDisabled ??= Color(
2024-05-14 16:26:03 +00:00
buttonTextPrimaryDisabledInt,
);
2023-04-19 18:11:51 +00:00
@ignore
Color? _buttonTextPrimaryDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonTextPrimaryDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextSecondaryDisabled =====================================================
@ignore
Color get buttonTextSecondaryDisabled =>
_buttonTextSecondaryDisabled ??= Color(buttonTextSecondaryDisabledInt);
@ignore
Color? _buttonTextSecondaryDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonTextSecondaryDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextBorder =====================================================
@ignore
Color get buttonTextBorder =>
_buttonTextBorder ??= Color(buttonTextBorderInt);
@ignore
Color? _buttonTextBorder;
2023-05-18 18:52:48 +00:00
late final int buttonTextBorderInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextDisabled =====================================================
@ignore
Color get buttonTextDisabled =>
_buttonTextDisabled ??= Color(buttonTextDisabledInt);
@ignore
Color? _buttonTextDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonTextDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextBorderless =====================================================
@ignore
Color get buttonTextBorderless =>
_buttonTextBorderless ??= Color(buttonTextBorderlessInt);
@ignore
Color? _buttonTextBorderless;
2023-05-18 18:52:48 +00:00
late final int buttonTextBorderlessInt;
2023-04-19 18:11:51 +00:00
// ==== buttonTextBorderlessDisabled =====================================================
@ignore
Color get buttonTextBorderlessDisabled =>
_buttonTextBorderlessDisabled ??= Color(buttonTextBorderlessDisabledInt);
@ignore
Color? _buttonTextBorderlessDisabled;
2023-05-18 18:52:48 +00:00
late final int buttonTextBorderlessDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== numberTextDefault =====================================================
@ignore
Color get numberTextDefault =>
_numberTextDefault ??= Color(numberTextDefaultInt);
@ignore
Color? _numberTextDefault;
2023-05-18 18:52:48 +00:00
late final int numberTextDefaultInt;
2023-04-19 18:11:51 +00:00
// ==== numpadTextDefault =====================================================
@ignore
Color get numpadTextDefault =>
_numpadTextDefault ??= Color(numpadTextDefaultInt);
@ignore
Color? _numpadTextDefault;
2023-05-18 18:52:48 +00:00
late final int numpadTextDefaultInt;
2023-04-19 18:11:51 +00:00
// ==== bottomNavText =====================================================
@ignore
Color get bottomNavText => _bottomNavText ??= Color(bottomNavTextInt);
@ignore
Color? _bottomNavText;
2023-05-18 18:52:48 +00:00
late final int bottomNavTextInt;
2023-04-19 18:11:51 +00:00
// ==== customTextButtonEnabledText =====================================================
@ignore
Color get customTextButtonEnabledText =>
_customTextButtonEnabledText ??= Color(customTextButtonEnabledTextInt);
@ignore
Color? _customTextButtonEnabledText;
2023-05-18 18:52:48 +00:00
late final int customTextButtonEnabledTextInt;
2023-04-19 18:11:51 +00:00
// ==== customTextButtonDisabledText =====================================================
@ignore
Color get customTextButtonDisabledText =>
_customTextButtonDisabledText ??= Color(customTextButtonDisabledTextInt);
@ignore
Color? _customTextButtonDisabledText;
2023-05-18 18:52:48 +00:00
late final int customTextButtonDisabledTextInt;
2023-04-19 18:11:51 +00:00
// ==== switchBGOn =====================================================
@ignore
Color get switchBGOn => _switchBGOn ??= Color(switchBGOnInt);
@ignore
Color? _switchBGOn;
2023-05-18 18:52:48 +00:00
late final int switchBGOnInt;
2023-04-19 18:11:51 +00:00
// ==== switchBGOff =====================================================
@ignore
Color get switchBGOff => _switchBGOff ??= Color(switchBGOffInt);
@ignore
Color? _switchBGOff;
2023-05-18 18:52:48 +00:00
late final int switchBGOffInt;
2023-04-19 18:11:51 +00:00
// ==== switchBGDisabled =====================================================
@ignore
Color get switchBGDisabled =>
_switchBGDisabled ??= Color(switchBGDisabledInt);
@ignore
Color? _switchBGDisabled;
2023-05-18 18:52:48 +00:00
late final int switchBGDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== switchCircleOn =====================================================
@ignore
Color get switchCircleOn => _switchCircleOn ??= Color(switchCircleOnInt);
@ignore
Color? _switchCircleOn;
2023-05-18 18:52:48 +00:00
late final int switchCircleOnInt;
2023-04-19 18:11:51 +00:00
// ==== switchCircleOff =====================================================
@ignore
Color get switchCircleOff => _switchCircleOff ??= Color(switchCircleOffInt);
@ignore
Color? _switchCircleOff;
2023-05-18 18:52:48 +00:00
late final int switchCircleOffInt;
2023-04-19 18:11:51 +00:00
// ==== switchCircleDisabled =====================================================
@ignore
Color get switchCircleDisabled =>
_switchCircleDisabled ??= Color(switchCircleDisabledInt);
@ignore
Color? _switchCircleDisabled;
2023-05-18 18:52:48 +00:00
late final int switchCircleDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorBGCheck =====================================================
@ignore
Color get stepIndicatorBGCheck =>
_stepIndicatorBGCheck ??= Color(stepIndicatorBGCheckInt);
@ignore
Color? _stepIndicatorBGCheck;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorBGCheckInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorBGNumber =====================================================
@ignore
Color get stepIndicatorBGNumber =>
_stepIndicatorBGNumber ??= Color(stepIndicatorBGNumberInt);
@ignore
Color? _stepIndicatorBGNumber;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorBGNumberInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorBGInactive =====================================================
@ignore
Color get stepIndicatorBGInactive =>
_stepIndicatorBGInactive ??= Color(stepIndicatorBGInactiveInt);
@ignore
Color? _stepIndicatorBGInactive;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorBGInactiveInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorBGLines =====================================================
@ignore
Color get stepIndicatorBGLines =>
_stepIndicatorBGLines ??= Color(stepIndicatorBGLinesInt);
@ignore
Color? _stepIndicatorBGLines;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorBGLinesInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorBGLinesInactive =====================================================
@ignore
Color get stepIndicatorBGLinesInactive =>
_stepIndicatorBGLinesInactive ??= Color(stepIndicatorBGLinesInactiveInt);
@ignore
Color? _stepIndicatorBGLinesInactive;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorBGLinesInactiveInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorIconText =====================================================
@ignore
Color get stepIndicatorIconText =>
_stepIndicatorIconText ??= Color(stepIndicatorIconTextInt);
@ignore
Color? _stepIndicatorIconText;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorIconTextInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorIconNumber =====================================================
@ignore
Color get stepIndicatorIconNumber =>
_stepIndicatorIconNumber ??= Color(stepIndicatorIconNumberInt);
@ignore
Color? _stepIndicatorIconNumber;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorIconNumberInt;
2023-04-19 18:11:51 +00:00
// ==== stepIndicatorIconInactive =====================================================
@ignore
Color get stepIndicatorIconInactive =>
_stepIndicatorIconInactive ??= Color(stepIndicatorIconInactiveInt);
@ignore
Color? _stepIndicatorIconInactive;
2023-05-18 18:52:48 +00:00
late final int stepIndicatorIconInactiveInt;
2023-04-19 18:11:51 +00:00
// ==== checkboxBGChecked =====================================================
@ignore
Color get checkboxBGChecked =>
_checkboxBGChecked ??= Color(checkboxBGCheckedInt);
@ignore
Color? _checkboxBGChecked;
2023-05-18 18:52:48 +00:00
late final int checkboxBGCheckedInt;
2023-04-19 18:11:51 +00:00
// ==== checkboxBorderEmpty =====================================================
@ignore
Color get checkboxBorderEmpty =>
_checkboxBorderEmpty ??= Color(checkboxBorderEmptyInt);
@ignore
Color? _checkboxBorderEmpty;
2023-05-18 18:52:48 +00:00
late final int checkboxBorderEmptyInt;
2023-04-19 18:11:51 +00:00
// ==== checkboxBGDisabled =====================================================
@ignore
Color get checkboxBGDisabled =>
_checkboxBGDisabled ??= Color(checkboxBGDisabledInt);
@ignore
Color? _checkboxBGDisabled;
2023-05-18 18:52:48 +00:00
late final int checkboxBGDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== checkboxIconChecked =====================================================
@ignore
Color get checkboxIconChecked =>
_checkboxIconChecked ??= Color(checkboxIconCheckedInt);
@ignore
Color? _checkboxIconChecked;
2023-05-18 18:52:48 +00:00
late final int checkboxIconCheckedInt;
2023-04-19 18:11:51 +00:00
// ==== checkboxIconDisabled =====================================================
@ignore
Color get checkboxIconDisabled =>
_checkboxIconDisabled ??= Color(checkboxIconDisabledInt);
@ignore
Color? _checkboxIconDisabled;
2023-05-18 18:52:48 +00:00
late final int checkboxIconDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== checkboxTextLabel =====================================================
@ignore
Color get checkboxTextLabel =>
_checkboxTextLabel ??= Color(checkboxTextLabelInt);
@ignore
Color? _checkboxTextLabel;
2023-05-18 18:52:48 +00:00
late final int checkboxTextLabelInt;
2023-04-19 18:11:51 +00:00
// ==== snackBarBackSuccess =====================================================
@ignore
Color get snackBarBackSuccess =>
_snackBarBackSuccess ??= Color(snackBarBackSuccessInt);
@ignore
Color? _snackBarBackSuccess;
2023-05-18 18:52:48 +00:00
late final int snackBarBackSuccessInt;
2023-04-19 18:11:51 +00:00
// ==== snackBarBackError =====================================================
@ignore
Color get snackBarBackError =>
_snackBarBackError ??= Color(snackBarBackErrorInt);
@ignore
Color? _snackBarBackError;
2023-05-18 18:52:48 +00:00
late final int snackBarBackErrorInt;
2023-04-19 18:11:51 +00:00
// ==== snackBarBackInfo =====================================================
@ignore
Color get snackBarBackInfo =>
_snackBarBackInfo ??= Color(snackBarBackInfoInt);
@ignore
Color? _snackBarBackInfo;
2023-05-18 18:52:48 +00:00
late final int snackBarBackInfoInt;
2023-04-19 18:11:51 +00:00
// ==== snackBarTextSuccess =====================================================
@ignore
Color get snackBarTextSuccess =>
_snackBarTextSuccess ??= Color(snackBarTextSuccessInt);
@ignore
Color? _snackBarTextSuccess;
2023-05-18 18:52:48 +00:00
late final int snackBarTextSuccessInt;
2023-04-19 18:11:51 +00:00
// ==== snackBarTextError =====================================================
@ignore
Color get snackBarTextError =>
_snackBarTextError ??= Color(snackBarTextErrorInt);
@ignore
Color? _snackBarTextError;
2023-05-18 18:52:48 +00:00
late final int snackBarTextErrorInt;
2023-04-19 18:11:51 +00:00
// ==== snackBarTextInfo =====================================================
@ignore
Color get snackBarTextInfo =>
_snackBarTextInfo ??= Color(snackBarTextInfoInt);
@ignore
Color? _snackBarTextInfo;
2023-05-18 18:52:48 +00:00
late final int snackBarTextInfoInt;
2023-04-19 18:11:51 +00:00
// ==== bottomNavIconBack =====================================================
@ignore
Color get bottomNavIconBack =>
_bottomNavIconBack ??= Color(bottomNavIconBackInt);
@ignore
Color? _bottomNavIconBack;
2023-05-18 18:52:48 +00:00
late final int bottomNavIconBackInt;
2023-04-19 18:11:51 +00:00
// ==== bottomNavIconIcon =====================================================
@ignore
Color get bottomNavIconIcon =>
_bottomNavIconIcon ??= Color(bottomNavIconIconInt);
@ignore
Color? _bottomNavIconIcon;
2023-05-18 18:52:48 +00:00
late final int bottomNavIconIconInt;
2023-04-19 18:11:51 +00:00
// ==== bottomNavIconIcon highlighted =====================================================
@ignore
Color get bottomNavIconIconHighlighted =>
_bottomNavIconIconHighlighted ??= Color(bottomNavIconIconHighlightedInt);
@ignore
Color? _bottomNavIconIconHighlighted;
2023-05-18 18:52:48 +00:00
late final int bottomNavIconIconHighlightedInt;
2023-04-19 18:11:51 +00:00
// ==== topNavIconPrimary =====================================================
@ignore
Color get topNavIconPrimary =>
_topNavIconPrimary ??= Color(topNavIconPrimaryInt);
@ignore
Color? _topNavIconPrimary;
2023-05-18 18:52:48 +00:00
late final int topNavIconPrimaryInt;
2023-04-19 18:11:51 +00:00
// ==== topNavIconGreen =====================================================
@ignore
Color get topNavIconGreen => _topNavIconGreen ??= Color(topNavIconGreenInt);
@ignore
Color? _topNavIconGreen;
2023-05-18 18:52:48 +00:00
late final int topNavIconGreenInt;
2023-04-19 18:11:51 +00:00
// ==== topNavIconYellow =====================================================
@ignore
Color get topNavIconYellow =>
_topNavIconYellow ??= Color(topNavIconYellowInt);
@ignore
Color? _topNavIconYellow;
2023-05-18 18:52:48 +00:00
late final int topNavIconYellowInt;
2023-04-19 18:11:51 +00:00
// ==== topNavIconRed =====================================================
@ignore
Color get topNavIconRed => _topNavIconRed ??= Color(topNavIconRedInt);
@ignore
Color? _topNavIconRed;
2023-05-18 18:52:48 +00:00
late final int topNavIconRedInt;
2023-04-19 18:11:51 +00:00
// ==== settingsIconBack =====================================================
@ignore
Color get settingsIconBack =>
_settingsIconBack ??= Color(settingsIconBackInt);
@ignore
Color? _settingsIconBack;
2023-05-18 18:52:48 +00:00
late final int settingsIconBackInt;
2023-04-19 18:11:51 +00:00
// ==== settingsIconIcon =====================================================
@ignore
Color get settingsIconIcon =>
_settingsIconIcon ??= Color(settingsIconIconInt);
@ignore
Color? _settingsIconIcon;
2023-05-18 18:52:48 +00:00
late final int settingsIconIconInt;
2023-04-19 18:11:51 +00:00
// ==== settingsIconBack2 =====================================================
@ignore
Color get settingsIconBack2 =>
_settingsIconBack2 ??= Color(settingsIconBack2Int);
@ignore
Color? _settingsIconBack2;
2023-05-18 18:52:48 +00:00
late final int settingsIconBack2Int;
2023-04-19 18:11:51 +00:00
// ==== settingsIconElement =====================================================
@ignore
Color get settingsIconElement =>
_settingsIconElement ??= Color(settingsIconElementInt);
@ignore
Color? _settingsIconElement;
2023-05-18 18:52:48 +00:00
late final int settingsIconElementInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldActiveBG =====================================================
@ignore
Color get textFieldActiveBG =>
_textFieldActiveBG ??= Color(textFieldActiveBGInt);
@ignore
Color? _textFieldActiveBG;
2023-05-18 18:52:48 +00:00
late final int textFieldActiveBGInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldDefaultBG =====================================================
@ignore
Color get textFieldDefaultBG =>
_textFieldDefaultBG ??= Color(textFieldDefaultBGInt);
@ignore
Color? _textFieldDefaultBG;
2023-05-18 18:52:48 +00:00
late final int textFieldDefaultBGInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldErrorBG =====================================================
@ignore
Color get textFieldErrorBG =>
_textFieldErrorBG ??= Color(textFieldErrorBGInt);
@ignore
Color? _textFieldErrorBG;
2023-05-18 18:52:48 +00:00
late final int textFieldErrorBGInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldSuccessBG =====================================================
@ignore
Color get textFieldSuccessBG =>
_textFieldSuccessBG ??= Color(textFieldSuccessBGInt);
@ignore
Color? _textFieldSuccessBG;
2023-05-18 18:52:48 +00:00
late final int textFieldSuccessBGInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldErrorBorder =====================================================
@ignore
Color get textFieldErrorBorder =>
_textFieldErrorBorder ??= Color(textFieldErrorBorderInt);
@ignore
Color? _textFieldErrorBorder;
2023-05-18 18:52:48 +00:00
late final int textFieldErrorBorderInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldSuccessBorder =====================================================
@ignore
Color get textFieldSuccessBorder =>
_textFieldSuccessBorder ??= Color(textFieldSuccessBorderInt);
@ignore
Color? _textFieldSuccessBorder;
2023-05-18 18:52:48 +00:00
late final int textFieldSuccessBorderInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldActiveSearchIconLeft =====================================================
2023-04-18 16:46:04 +00:00
@ignore
2023-04-19 18:11:51 +00:00
Color get textFieldActiveSearchIconLeft => _textFieldActiveSearchIconLeft ??=
Color(textFieldActiveSearchIconLeftInt);
2023-04-18 16:46:04 +00:00
@ignore
2023-04-19 18:11:51 +00:00
Color? _textFieldActiveSearchIconLeft;
2023-05-18 18:52:48 +00:00
late final int textFieldActiveSearchIconLeftInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldDefaultSearchIconLeft =====================================================
2023-04-18 16:46:04 +00:00
@ignore
2023-04-19 18:11:51 +00:00
Color get textFieldDefaultSearchIconLeft =>
_textFieldDefaultSearchIconLeft ??=
Color(textFieldDefaultSearchIconLeftInt);
2023-04-18 16:46:04 +00:00
@ignore
2023-04-19 18:11:51 +00:00
Color? _textFieldDefaultSearchIconLeft;
2023-05-18 18:52:48 +00:00
late final int textFieldDefaultSearchIconLeftInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldErrorSearchIconLeft =====================================================
2023-04-18 16:46:04 +00:00
@ignore
2023-04-19 18:11:51 +00:00
Color get textFieldErrorSearchIconLeft =>
_textFieldErrorSearchIconLeft ??= Color(textFieldErrorSearchIconLeftInt);
2023-04-18 16:46:04 +00:00
@ignore
2023-04-19 18:11:51 +00:00
Color? _textFieldErrorSearchIconLeft;
2023-05-18 18:52:48 +00:00
late final int textFieldErrorSearchIconLeftInt;
2023-04-18 16:46:04 +00:00
2023-04-19 18:11:51 +00:00
// ==== textFieldSuccessSearchIconLeft =====================================================
@ignore
Color get textFieldSuccessSearchIconLeft =>
_textFieldSuccessSearchIconLeft ??=
Color(textFieldSuccessSearchIconLeftInt);
@ignore
Color? _textFieldSuccessSearchIconLeft;
2023-05-18 18:52:48 +00:00
late final int textFieldSuccessSearchIconLeftInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldActiveText =====================================================
@ignore
Color get textFieldActiveText =>
_textFieldActiveText ??= Color(textFieldActiveTextInt);
@ignore
Color? _textFieldActiveText;
2023-05-18 18:52:48 +00:00
late final int textFieldActiveTextInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldDefaultText =====================================================
@ignore
Color get textFieldDefaultText =>
_textFieldDefaultText ??= Color(textFieldDefaultTextInt);
@ignore
Color? _textFieldDefaultText;
2023-05-18 18:52:48 +00:00
late final int textFieldDefaultTextInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldErrorText =====================================================
@ignore
Color get textFieldErrorText =>
_textFieldErrorText ??= Color(textFieldErrorTextInt);
@ignore
Color? _textFieldErrorText;
2023-05-18 18:52:48 +00:00
late final int textFieldErrorTextInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldSuccessText =====================================================
@ignore
Color get textFieldSuccessText =>
_textFieldSuccessText ??= Color(textFieldSuccessTextInt);
@ignore
Color? _textFieldSuccessText;
2023-05-18 18:52:48 +00:00
late final int textFieldSuccessTextInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldActiveLabel =====================================================
@ignore
Color get textFieldActiveLabel =>
_textFieldActiveLabel ??= Color(textFieldActiveLabelInt);
@ignore
Color? _textFieldActiveLabel;
2023-05-18 18:52:48 +00:00
late final int textFieldActiveLabelInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldErrorLabel =====================================================
@ignore
Color get textFieldErrorLabel =>
_textFieldErrorLabel ??= Color(textFieldErrorLabelInt);
@ignore
Color? _textFieldErrorLabel;
2023-05-18 18:52:48 +00:00
late final int textFieldErrorLabelInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldSuccessLabel =====================================================
@ignore
Color get textFieldSuccessLabel =>
_textFieldSuccessLabel ??= Color(textFieldSuccessLabelInt);
@ignore
Color? _textFieldSuccessLabel;
2023-05-18 18:52:48 +00:00
late final int textFieldSuccessLabelInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldActiveSearchIconRight =====================================================
@ignore
Color get textFieldActiveSearchIconRight =>
_textFieldActiveSearchIconRight ??=
Color(textFieldActiveSearchIconRightInt);
@ignore
Color? _textFieldActiveSearchIconRight;
2023-05-18 18:52:48 +00:00
late final int textFieldActiveSearchIconRightInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldDefaultSearchIconRight =====================================================
@ignore
Color get textFieldDefaultSearchIconRight =>
_textFieldDefaultSearchIconRight ??=
Color(textFieldDefaultSearchIconRightInt);
@ignore
Color? _textFieldDefaultSearchIconRight;
2023-05-18 18:52:48 +00:00
late final int textFieldDefaultSearchIconRightInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldErrorSearchIconRight =====================================================
@ignore
Color get textFieldErrorSearchIconRight => _textFieldErrorSearchIconRight ??=
Color(textFieldErrorSearchIconRightInt);
@ignore
Color? _textFieldErrorSearchIconRight;
2023-05-18 18:52:48 +00:00
late final int textFieldErrorSearchIconRightInt;
2023-04-19 18:11:51 +00:00
// ==== textFieldSuccessSearchIconRight =====================================================
@ignore
Color get textFieldSuccessSearchIconRight =>
_textFieldSuccessSearchIconRight ??=
Color(textFieldSuccessSearchIconRightInt);
@ignore
Color? _textFieldSuccessSearchIconRight;
2023-05-18 18:52:48 +00:00
late final int textFieldSuccessSearchIconRightInt;
2023-04-19 18:11:51 +00:00
// ==== settingsItem2ActiveBG =====================================================
@ignore
Color get settingsItem2ActiveBG =>
_settingsItem2ActiveBG ??= Color(settingsItem2ActiveBGInt);
@ignore
Color? _settingsItem2ActiveBG;
2023-05-18 18:52:48 +00:00
late final int settingsItem2ActiveBGInt;
2023-04-19 18:11:51 +00:00
// ==== settingsItem2ActiveText =====================================================
@ignore
Color get settingsItem2ActiveText =>
_settingsItem2ActiveText ??= Color(settingsItem2ActiveTextInt);
@ignore
Color? _settingsItem2ActiveText;
2023-05-18 18:52:48 +00:00
late final int settingsItem2ActiveTextInt;
2023-04-19 18:11:51 +00:00
// ==== settingsItem2ActiveSub =====================================================
@ignore
Color get settingsItem2ActiveSub =>
_settingsItem2ActiveSub ??= Color(settingsItem2ActiveSubInt);
@ignore
Color? _settingsItem2ActiveSub;
2023-05-18 18:52:48 +00:00
late final int settingsItem2ActiveSubInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonIconBorder =====================================================
@ignore
Color get radioButtonIconBorder =>
_radioButtonIconBorder ??= Color(radioButtonIconBorderInt);
@ignore
Color? _radioButtonIconBorder;
2023-05-18 18:52:48 +00:00
late final int radioButtonIconBorderInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonIconBorderDisabled =====================================================
@ignore
Color get radioButtonIconBorderDisabled => _radioButtonIconBorderDisabled ??=
Color(radioButtonIconBorderDisabledInt);
@ignore
Color? _radioButtonIconBorderDisabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonIconBorderDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonBorderEnabled =====================================================
@ignore
Color get radioButtonBorderEnabled =>
_radioButtonBorderEnabled ??= Color(radioButtonBorderEnabledInt);
@ignore
Color? _radioButtonBorderEnabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonBorderEnabledInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonBorderDisabled =====================================================
@ignore
Color get radioButtonBorderDisabled =>
_radioButtonBorderDisabled ??= Color(radioButtonBorderDisabledInt);
@ignore
Color? _radioButtonBorderDisabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonBorderDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonIconCircle =====================================================
@ignore
Color get radioButtonIconCircle =>
_radioButtonIconCircle ??= Color(radioButtonIconCircleInt);
@ignore
Color? _radioButtonIconCircle;
2023-05-18 18:52:48 +00:00
late final int radioButtonIconCircleInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonIconEnabled =====================================================
@ignore
Color get radioButtonIconEnabled =>
_radioButtonIconEnabled ??= Color(radioButtonIconEnabledInt);
@ignore
Color? _radioButtonIconEnabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonIconEnabledInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonTextEnabled =====================================================
@ignore
Color get radioButtonTextEnabled =>
_radioButtonTextEnabled ??= Color(radioButtonTextEnabledInt);
@ignore
Color? _radioButtonTextEnabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonTextEnabledInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonTextDisabled =====================================================
@ignore
Color get radioButtonTextDisabled =>
_radioButtonTextDisabled ??= Color(radioButtonTextDisabledInt);
@ignore
Color? _radioButtonTextDisabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonTextDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonLabelEnabled =====================================================
@ignore
Color get radioButtonLabelEnabled =>
_radioButtonLabelEnabled ??= Color(radioButtonLabelEnabledInt);
@ignore
Color? _radioButtonLabelEnabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonLabelEnabledInt;
2023-04-19 18:11:51 +00:00
// ==== radioButtonLabelDisabled =====================================================
@ignore
Color get radioButtonLabelDisabled =>
_radioButtonLabelDisabled ??= Color(radioButtonLabelDisabledInt);
@ignore
Color? _radioButtonLabelDisabled;
2023-05-18 18:52:48 +00:00
late final int radioButtonLabelDisabledInt;
2023-04-19 18:11:51 +00:00
// ==== infoItemBG =====================================================
@ignore
Color get infoItemBG => _infoItemBG ??= Color(infoItemBGInt);
@ignore
Color? _infoItemBG;
2023-05-18 18:52:48 +00:00
late final int infoItemBGInt;
2023-04-19 18:11:51 +00:00
// ==== infoItemLabel =====================================================
@ignore
Color get infoItemLabel => _infoItemLabel ??= Color(infoItemLabelInt);
@ignore
Color? _infoItemLabel;
2023-05-18 18:52:48 +00:00
late final int infoItemLabelInt;
2023-04-19 18:11:51 +00:00
// ==== infoItemText =====================================================
@ignore
Color get infoItemText => _infoItemText ??= Color(infoItemTextInt);
@ignore
Color? _infoItemText;
2023-05-18 18:52:48 +00:00
late final int infoItemTextInt;
2023-04-19 18:11:51 +00:00
// ==== infoItemIcons =====================================================
@ignore
Color get infoItemIcons => _infoItemIcons ??= Color(infoItemIconsInt);
@ignore
Color? _infoItemIcons;
2023-05-18 18:52:48 +00:00
late final int infoItemIconsInt;
2023-04-19 18:11:51 +00:00
// ==== popupBG =====================================================
@ignore
Color get popupBG => _popupBG ??= Color(popupBGInt);
@ignore
Color? _popupBG;
2023-05-18 18:52:48 +00:00
late final int popupBGInt;
2023-04-19 18:11:51 +00:00
// ==== currencyListItemBG =====================================================
@ignore
Color get currencyListItemBG =>
_currencyListItemBG ??= Color(currencyListItemBGInt);
@ignore
Color? _currencyListItemBG;
2023-05-18 18:52:48 +00:00
late final int currencyListItemBGInt;
2023-04-19 18:11:51 +00:00
// ==== stackWalletBG =====================================================
@ignore
Color get stackWalletBG => _stackWalletBG ??= Color(stackWalletBGInt);
@ignore
Color? _stackWalletBG;
2023-05-18 18:52:48 +00:00
late final int stackWalletBGInt;
2023-04-19 18:11:51 +00:00
// ==== stackWalletMid =====================================================
@ignore
Color get stackWalletMid => _stackWalletMid ??= Color(stackWalletMidInt);
@ignore
Color? _stackWalletMid;
2023-05-18 18:52:48 +00:00
late final int stackWalletMidInt;
2023-04-19 18:11:51 +00:00
// ==== stackWalletBottom =====================================================
@ignore
Color get stackWalletBottom =>
_stackWalletBottom ??= Color(stackWalletBottomInt);
@ignore
Color? _stackWalletBottom;
2023-05-18 18:52:48 +00:00
late final int stackWalletBottomInt;
2023-04-19 18:11:51 +00:00
// ==== bottomNavShadow =====================================================
@ignore
Color get bottomNavShadow => _bottomNavShadow ??= Color(bottomNavShadowInt);
@ignore
Color? _bottomNavShadow;
2023-05-18 18:52:48 +00:00
late final int bottomNavShadowInt;
2023-04-19 18:11:51 +00:00
// ==== favoriteStarActive =====================================================
@ignore
Color get favoriteStarActive =>
_favoriteStarActive ??= Color(favoriteStarActiveInt);
@ignore
Color? _favoriteStarActive;
2023-05-18 18:52:48 +00:00
late final int favoriteStarActiveInt;
2023-04-19 18:11:51 +00:00
// ==== favoriteStarInactive =====================================================
@ignore
Color get favoriteStarInactive =>
_favoriteStarInactive ??= Color(favoriteStarInactiveInt);
@ignore
Color? _favoriteStarInactive;
2023-05-18 18:52:48 +00:00
late final int favoriteStarInactiveInt;
2023-04-19 18:11:51 +00:00
// ==== splash =====================================================
@ignore
Color get splash => _splash ??= Color(splashInt);
@ignore
Color? _splash;
2023-05-18 18:52:48 +00:00
late final int splashInt;
2023-04-19 18:11:51 +00:00
// ==== highlight =====================================================
@ignore
Color get highlight => _highlight ??= Color(highlightInt);
@ignore
Color? _highlight;
2023-05-18 18:52:48 +00:00
late final int highlightInt;
2023-04-19 18:11:51 +00:00
// ==== warningForeground =====================================================
@ignore
Color get warningForeground =>
_warningForeground ??= Color(warningForegroundInt);
@ignore
Color? _warningForeground;
2023-05-18 18:52:48 +00:00
late final int warningForegroundInt;
2023-04-19 18:11:51 +00:00
// ==== warningBackground =====================================================
@ignore
Color get warningBackground =>
_warningBackground ??= Color(warningBackgroundInt);
@ignore
Color? _warningBackground;
2023-05-18 18:52:48 +00:00
late final int warningBackgroundInt;
2023-04-19 18:11:51 +00:00
// ==== loadingOverlayTextColor =====================================================
@ignore
Color get loadingOverlayTextColor =>
_loadingOverlayTextColor ??= Color(loadingOverlayTextColorInt);
@ignore
Color? _loadingOverlayTextColor;
2023-05-18 18:52:48 +00:00
late final int loadingOverlayTextColorInt;
2023-04-19 18:11:51 +00:00
// ==== myStackContactIconBG =====================================================
@ignore
Color get myStackContactIconBG =>
_myStackContactIconBG ??= Color(myStackContactIconBGInt);
@ignore
Color? _myStackContactIconBG;
2023-05-18 18:52:48 +00:00
late final int myStackContactIconBGInt;
2023-04-19 18:11:51 +00:00
// ==== textConfirmTotalAmount =====================================================
@ignore
Color get textConfirmTotalAmount =>
_textConfirmTotalAmount ??= Color(textConfirmTotalAmountInt);
@ignore
Color? _textConfirmTotalAmount;
2023-05-18 18:52:48 +00:00
late final int textConfirmTotalAmountInt;
2023-04-19 18:11:51 +00:00
// ==== textSelectedWordTableItem =====================================================
@ignore
Color get textSelectedWordTableItem =>
_textSelectedWordTableItem ??= Color(textSelectedWordTableItemInt);
@ignore
Color? _textSelectedWordTableItem;
2023-05-18 18:52:48 +00:00
late final int textSelectedWordTableItemInt;
2023-04-19 18:11:51 +00:00
// ==== rateTypeToggleColorOn =====================================================
@ignore
Color get rateTypeToggleColorOn =>
_rateTypeToggleColorOn ??= Color(rateTypeToggleColorOnInt);
@ignore
Color? _rateTypeToggleColorOn;
2023-05-18 18:52:48 +00:00
late final int rateTypeToggleColorOnInt;
2023-04-19 18:11:51 +00:00
// ==== rateTypeToggleColorOff =====================================================
@ignore
Color get rateTypeToggleColorOff =>
_rateTypeToggleColorOff ??= Color(rateTypeToggleColorOffInt);
@ignore
Color? _rateTypeToggleColorOff;
2023-05-18 18:52:48 +00:00
late final int rateTypeToggleColorOffInt;
2023-04-19 18:11:51 +00:00
// ==== rateTypeToggleDesktopColorOn =====================================================
@ignore
Color get rateTypeToggleDesktopColorOn =>
_rateTypeToggleDesktopColorOn ??= Color(rateTypeToggleDesktopColorOnInt);
@ignore
Color? _rateTypeToggleDesktopColorOn;
2023-05-18 18:52:48 +00:00
late final int rateTypeToggleDesktopColorOnInt;
2023-04-19 18:11:51 +00:00
// ==== rateTypeToggleDesktopColorOff =====================================================
@ignore
Color get rateTypeToggleDesktopColorOff => _rateTypeToggleDesktopColorOff ??=
Color(rateTypeToggleDesktopColorOffInt);
@ignore
Color? _rateTypeToggleDesktopColorOff;
2023-05-18 18:52:48 +00:00
late final int rateTypeToggleDesktopColorOffInt;
2023-04-19 18:11:51 +00:00
// ==== ethTagText =====================================================
@ignore
Color get ethTagText => _ethTagText ??= Color(ethTagTextInt);
@ignore
Color? _ethTagText;
2023-05-18 18:52:48 +00:00
late final int ethTagTextInt;
2023-04-19 18:11:51 +00:00
// ==== ethTagBG =====================================================
@ignore
Color get ethTagBG => _ethTagBG ??= Color(ethTagBGInt);
@ignore
Color? _ethTagBG;
2023-05-18 18:52:48 +00:00
late final int ethTagBGInt;
2023-04-19 18:11:51 +00:00
// ==== ethWalletTagText =====================================================
@ignore
Color get ethWalletTagText =>
_ethWalletTagText ??= Color(ethWalletTagTextInt);
@ignore
Color? _ethWalletTagText;
2023-05-18 18:52:48 +00:00
late final int ethWalletTagTextInt;
2023-04-19 18:11:51 +00:00
// ==== ethWalletTagBG =====================================================
@ignore
Color get ethWalletTagBG => _ethWalletTagBG ??= Color(ethWalletTagBGInt);
@ignore
Color? _ethWalletTagBG;
2023-05-18 18:52:48 +00:00
late final int ethWalletTagBGInt;
2023-04-19 18:11:51 +00:00
// ==== tokenSummaryTextPrimary =====================================================
@ignore
Color get tokenSummaryTextPrimary =>
_tokenSummaryTextPrimary ??= Color(tokenSummaryTextPrimaryInt);
@ignore
Color? _tokenSummaryTextPrimary;
2023-05-18 18:52:48 +00:00
late final int tokenSummaryTextPrimaryInt;
2023-04-19 18:11:51 +00:00
// ==== tokenSummaryTextSecondary =====================================================
@ignore
Color get tokenSummaryTextSecondary =>
_tokenSummaryTextSecondary ??= Color(tokenSummaryTextSecondaryInt);
@ignore
Color? _tokenSummaryTextSecondary;
2023-05-18 18:52:48 +00:00
late final int tokenSummaryTextSecondaryInt;
2023-04-19 18:11:51 +00:00
// ==== tokenSummaryBG =====================================================
@ignore
Color get tokenSummaryBG => _tokenSummaryBG ??= Color(tokenSummaryBGInt);
@ignore
Color? _tokenSummaryBG;
2023-05-18 18:52:48 +00:00
late final int tokenSummaryBGInt;
2023-04-19 18:11:51 +00:00
// ==== tokenSummaryButtonBG =====================================================
@ignore
Color get tokenSummaryButtonBG =>
_tokenSummaryButtonBG ??= Color(tokenSummaryButtonBGInt);
@ignore
Color? _tokenSummaryButtonBG;
2023-05-18 18:52:48 +00:00
late final int tokenSummaryButtonBGInt;
2023-04-19 18:11:51 +00:00
// ==== tokenSummaryIcon =====================================================
@ignore
Color get tokenSummaryIcon =>
_tokenSummaryIcon ??= Color(tokenSummaryIconInt);
@ignore
Color? _tokenSummaryIcon;
2023-05-18 18:52:48 +00:00
late final int tokenSummaryIconInt;
2023-04-19 18:11:51 +00:00
// ==== coinColors =====================================================
2023-04-20 15:32:50 +00:00
2023-04-18 16:46:04 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, Color> get coinColors =>
2023-04-20 15:32:50 +00:00
_coinColors ??= parseCoinColors(coinColorsJsonString);
2023-04-18 16:46:04 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, Color>? _coinColors;
2023-05-18 18:52:48 +00:00
late final String coinColorsJsonString;
2023-04-20 15:32:50 +00:00
2023-04-19 18:11:51 +00:00
// ==== assets =====================================================
2023-04-18 16:46:04 +00:00
2023-05-18 18:52:48 +00:00
@Name("assets") // legacy "column" name
late final ThemeAssets? assetsV1;
late final ThemeAssetsV2? assetsV2;
2023-06-08 16:35:44 +00:00
// cheat build runner into adding this at end of property id list in isar
@Name("zAssetsV3")
late final ThemeAssetsV3? assetsV3;
2023-05-18 18:52:48 +00:00
@ignore
2023-06-08 16:35:44 +00:00
IThemeAssets get assets => assetsV3 ?? assetsV2 ?? assetsV1!;
2023-04-20 15:32:50 +00:00
// ===========================================================================
2023-05-18 18:52:48 +00:00
late final int? version;
StackTheme();
2023-04-18 16:46:04 +00:00
2023-04-20 15:32:50 +00:00
factory StackTheme.fromJson({
required Map<String, dynamic> json,
}) {
2023-05-18 18:52:48 +00:00
final version = json["version"] as int? ?? 1;
return StackTheme()
..version = version
..assetsV1 = version == 1
? ThemeAssets.fromJson(
2024-05-14 16:26:03 +00:00
json: Map<String, dynamic>.from(json["assets"] as Map),
themeId: json["id"] as String,
)
2023-05-18 18:52:48 +00:00
: null
2023-06-08 16:35:44 +00:00
..assetsV2 = version == 2
2023-05-18 18:52:48 +00:00
? ThemeAssetsV2.fromJson(
2024-05-14 16:26:03 +00:00
json: Map<String, dynamic>.from(json["assets"] as Map),
themeId: json["id"] as String,
)
2023-05-18 18:52:48 +00:00
: null
2023-06-08 16:35:44 +00:00
..assetsV3 = version >= 3
? ThemeAssetsV3.fromJson(
2024-05-14 16:26:03 +00:00
json: Map<String, dynamic>.from(json["assets"] as Map),
themeId: json["id"] as String,
)
2023-07-25 13:58:29 +00:00
: null
2023-05-18 18:52:48 +00:00
..themeId = json["id"] as String
..name = json["name"] as String
..brightnessString = json["brightness"] as String
..backgroundInt = parseColor(json["colors"]["background"] as String)
..backgroundAppBarInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["background_app_bar"] as String)
2023-05-18 18:52:48 +00:00
..gradientBackgroundString = json["colors"]["gradients"] != null
? jsonEncode(json["colors"]["gradients"])
2023-05-18 18:52:48 +00:00
: null
..standardBoxShadowString =
2024-05-14 16:26:03 +00:00
jsonEncode(json["colors"]["box_shadows"]["standard"] as Map)
2023-05-18 18:52:48 +00:00
..homeViewButtonBarBoxShadowString =
2024-05-14 16:26:03 +00:00
json["colors"]["box_shadows"]["home_view_button_bar"] == null
? null
: jsonEncode(
json["colors"]["box_shadows"]["home_view_button_bar"] as Map,
)
2023-05-18 18:52:48 +00:00
..coinColorsJsonString = jsonEncode(json["colors"]['coin'] as Map)
..overlayInt = parseColor(json["colors"]["overlay"] as String)
..accentColorBlueInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["accent_color_blue"] as String)
2023-05-18 18:52:48 +00:00
..accentColorGreenInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["accent_color_green"] as String)
2023-05-18 18:52:48 +00:00
..accentColorYellowInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["accent_color_yellow"] as String)
2023-05-18 18:52:48 +00:00
..accentColorRedInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["accent_color_red"] as String)
2023-05-18 18:52:48 +00:00
..accentColorOrangeInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["accent_color_orange"] as String)
2023-05-18 18:52:48 +00:00
..accentColorDarkInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["accent_color_dark"] as String)
2023-05-18 18:52:48 +00:00
..shadowInt = parseColor(json["colors"]["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 =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_favorite"] as String)
2023-05-18 18:52:48 +00:00
..textErrorInt = parseColor(json["colors"]["text_error"] as String)
..textRestoreInt = parseColor(json["colors"]["text_restore"] as String)
..buttonBackPrimaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_back_primary"] as String)
2023-05-18 18:52:48 +00:00
..buttonBackSecondaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_back_secondary"] as String)
2023-05-18 18:52:48 +00:00
..buttonBackPrimaryDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_back_primary_disabled"] as String)
2023-05-18 18:52:48 +00:00
..buttonBackSecondaryDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_back_secondary_disabled"] as String)
2023-05-18 18:52:48 +00:00
..buttonBackBorderInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_back_border"] as String)
2023-05-18 18:52:48 +00:00
..buttonBackBorderDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_back_border_disabled"] as String)
2023-05-18 18:52:48 +00:00
..buttonBackBorderSecondaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_back_border_secondary"] as String)
2023-05-18 18:52:48 +00:00
..buttonBackBorderSecondaryDisabledInt = parseColor(
json["colors"]["button_back_border_secondary_disabled"] as String,
)
2023-05-18 18:52:48 +00:00
..numberBackDefaultInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["number_back_default"] as String)
2023-05-18 18:52:48 +00:00
..numpadBackDefaultInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["numpad_back_default"] as String)
2023-05-18 18:52:48 +00:00
..bottomNavBackInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["bottom_nav_back"] as String)
2023-05-18 18:52:48 +00:00
..textSubtitle1Int =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_subtitle_one"] as String)
2023-05-18 18:52:48 +00:00
..textSubtitle2Int =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_subtitle_two"] as String)
2023-05-18 18:52:48 +00:00
..textSubtitle3Int =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_subtitle_three"] as String)
2023-05-18 18:52:48 +00:00
..textSubtitle4Int =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_subtitle_four"] as String)
2023-05-18 18:52:48 +00:00
..textSubtitle5Int =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_subtitle_five"] as String)
2023-05-18 18:52:48 +00:00
..textSubtitle6Int =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_subtitle_six"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextPrimaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_text_primary"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextSecondaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_text_secondary"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextPrimaryDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_text_primary_disabled"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextSecondaryDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_text_secondary_disabled"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextBorderInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_text_border"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_text_disabled"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextBorderlessInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["button_text_borderless"] as String)
2023-05-18 18:52:48 +00:00
..buttonTextBorderlessDisabledInt = parseColor(
json["colors"]["button_text_borderless_disabled"] as String,
)
2023-05-18 18:52:48 +00:00
..numberTextDefaultInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["number_text_default"] as String)
2023-05-18 18:52:48 +00:00
..numpadTextDefaultInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["numpad_text_default"] as String)
2023-05-18 18:52:48 +00:00
..bottomNavTextInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["bottom_nav_text"] as String)
2023-05-18 18:52:48 +00:00
..customTextButtonEnabledTextInt = parseColor(
json["colors"]["custom_text_button_enabled_text"] as String,
)
2023-05-18 18:52:48 +00:00
..customTextButtonDisabledTextInt = parseColor(
json["colors"]["custom_text_button_disabled_text"] as String,
)
2023-05-18 18:52:48 +00:00
..switchBGOnInt = parseColor(json["colors"]["switch_bg_on"] as String)
..switchBGOffInt = parseColor(json["colors"]["switch_bg_off"] as String)
..switchBGDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["switch_bg_disabled"] as String)
2023-05-18 18:52:48 +00:00
..switchCircleOnInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["switch_circle_on"] as String)
2023-05-18 18:52:48 +00:00
..switchCircleOffInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["switch_circle_off"] as String)
2023-05-18 18:52:48 +00:00
..switchCircleDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["switch_circle_disabled"] as String)
2023-05-18 18:52:48 +00:00
..stepIndicatorBGCheckInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["step_indicator_bg_check"] as String)
2023-05-18 18:52:48 +00:00
..stepIndicatorBGNumberInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["step_indicator_bg_number"] as String)
2023-05-18 18:52:48 +00:00
..stepIndicatorBGInactiveInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["step_indicator_bg_inactive"] as String)
2023-05-18 18:52:48 +00:00
..stepIndicatorBGLinesInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["step_indicator_bg_lines"] as String)
2023-05-18 18:52:48 +00:00
..stepIndicatorBGLinesInactiveInt = parseColor(
json["colors"]["step_indicator_bg_lines_inactive"] as String,
)
2023-05-18 18:52:48 +00:00
..stepIndicatorIconTextInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["step_indicator_icon_text"] as String)
2023-05-18 18:52:48 +00:00
..stepIndicatorIconNumberInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["step_indicator_icon_number"] as String)
2023-05-18 18:52:48 +00:00
..stepIndicatorIconInactiveInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["step_indicator_icon_inactive"] as String)
2023-05-18 18:52:48 +00:00
..checkboxBGCheckedInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["checkbox_bg_checked"] as String)
2023-05-18 18:52:48 +00:00
..checkboxBorderEmptyInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["checkbox_border_empty"] as String)
2023-05-18 18:52:48 +00:00
..checkboxBGDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["checkbox_bg_disabled"] as String)
2023-05-18 18:52:48 +00:00
..checkboxIconCheckedInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["checkbox_icon_checked"] as String)
2023-05-18 18:52:48 +00:00
..checkboxIconDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["checkbox_icon_disabled"] as String)
2023-05-18 18:52:48 +00:00
..checkboxTextLabelInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["checkbox_text_label"] as String)
2023-05-18 18:52:48 +00:00
..snackBarBackSuccessInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["snack_bar_back_success"] as String)
2023-05-18 18:52:48 +00:00
..snackBarBackErrorInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["snack_bar_back_error"] as String)
2023-05-18 18:52:48 +00:00
..snackBarBackInfoInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["snack_bar_back_info"] as String)
2023-05-18 18:52:48 +00:00
..snackBarTextSuccessInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["snack_bar_text_success"] as String)
2023-05-18 18:52:48 +00:00
..snackBarTextErrorInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["snack_bar_text_error"] as String)
2023-05-18 18:52:48 +00:00
..snackBarTextInfoInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["snack_bar_text_info"] as String)
2023-05-18 18:52:48 +00:00
..bottomNavIconBackInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["bottom_nav_icon_back"] as String)
2023-05-18 18:52:48 +00:00
..bottomNavIconIconInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["bottom_nav_icon_icon"] as String)
2023-05-18 18:52:48 +00:00
..bottomNavIconIconHighlightedInt = parseColor(
json["colors"]["bottom_nav_icon_icon_highlighted"] as String,
)
2023-05-18 18:52:48 +00:00
..topNavIconPrimaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["top_nav_icon_primary"] as String)
2023-05-18 18:52:48 +00:00
..topNavIconGreenInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["top_nav_icon_green"] as String)
2023-05-18 18:52:48 +00:00
..topNavIconYellowInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["top_nav_icon_yellow"] as String)
2023-05-18 18:52:48 +00:00
..topNavIconRedInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["top_nav_icon_red"] as String)
2023-05-18 18:52:48 +00:00
..settingsIconBackInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["settings_icon_back"] as String)
2023-05-18 18:52:48 +00:00
..settingsIconIconInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["settings_icon_icon"] as String)
2023-05-18 18:52:48 +00:00
..settingsIconBack2Int =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["settings_icon_back_two"] as String)
2023-05-18 18:52:48 +00:00
..settingsIconElementInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["settings_icon_element"] as String)
2023-05-18 18:52:48 +00:00
..textFieldActiveBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_active_bg"] as String)
2023-05-18 18:52:48 +00:00
..textFieldDefaultBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_default_bg"] as String)
2023-05-18 18:52:48 +00:00
..textFieldErrorBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_error_bg"] as String)
2023-05-18 18:52:48 +00:00
..textFieldSuccessBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_success_bg"] as String)
2023-05-18 18:52:48 +00:00
..textFieldErrorBorderInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_error_border"] as String)
2023-05-18 18:52:48 +00:00
..textFieldSuccessBorderInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_success_border"] as String)
2023-05-18 18:52:48 +00:00
..textFieldActiveSearchIconLeftInt = parseColor(
json["colors"]["text_field_active_search_icon_left"] as String,
)
2023-05-18 18:52:48 +00:00
..textFieldDefaultSearchIconLeftInt = parseColor(
json["colors"]["text_field_default_search_icon_left"] as String,
)
2023-05-18 18:52:48 +00:00
..textFieldErrorSearchIconLeftInt = parseColor(
json["colors"]["text_field_error_search_icon_left"] as String,
)
2023-05-18 18:52:48 +00:00
..textFieldSuccessSearchIconLeftInt = parseColor(
json["colors"]["text_field_success_search_icon_left"] as String,
)
2023-05-18 18:52:48 +00:00
..textFieldActiveTextInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_active_text"] as String)
2023-05-18 18:52:48 +00:00
..textFieldDefaultTextInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_default_text"] as String)
2023-05-18 18:52:48 +00:00
..textFieldErrorTextInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_error_text"] as String)
2023-05-18 18:52:48 +00:00
..textFieldSuccessTextInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_success_text"] as String)
2023-05-18 18:52:48 +00:00
..textFieldActiveLabelInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_active_label"] as String)
2023-05-18 18:52:48 +00:00
..textFieldErrorLabelInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_error_label"] as String)
2023-05-18 18:52:48 +00:00
..textFieldSuccessLabelInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_field_success_label"] as String)
2023-05-18 18:52:48 +00:00
..textFieldActiveSearchIconRightInt = parseColor(
json["colors"]["text_field_active_search_icon_right"] as String,
)
2023-05-18 18:52:48 +00:00
..textFieldDefaultSearchIconRightInt = parseColor(
json["colors"]["text_field_default_search_icon_right"] as String,
)
2023-05-18 18:52:48 +00:00
..textFieldErrorSearchIconRightInt = parseColor(
json["colors"]["text_field_error_search_icon_right"] as String,
)
2023-05-18 18:52:48 +00:00
..textFieldSuccessSearchIconRightInt = parseColor(
json["colors"]["text_field_success_search_icon_right"] as String,
)
2023-05-18 18:52:48 +00:00
..settingsItem2ActiveBGInt = parseColor(
json["colors"]["settings_item_level_two_active_bg"] as String,
)
2023-05-18 18:52:48 +00:00
..settingsItem2ActiveTextInt = parseColor(
json["colors"]["settings_item_level_two_active_text"] as String,
)
2023-05-18 18:52:48 +00:00
..settingsItem2ActiveSubInt = parseColor(
json["colors"]["settings_item_level_two_active_sub"] as String,
)
2023-05-18 18:52:48 +00:00
..radioButtonIconBorderInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_icon_border"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonIconBorderDisabledInt = parseColor(
json["colors"]["radio_button_icon_border_disabled"] as String,
)
2023-05-18 18:52:48 +00:00
..radioButtonBorderEnabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_border_enabled"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonBorderDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_border_disabled"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonIconCircleInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_icon_circle"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonIconEnabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_icon_enabled"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonTextEnabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_text_enabled"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonTextDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_text_disabled"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonLabelEnabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_label_enabled"] as String)
2023-05-18 18:52:48 +00:00
..radioButtonLabelDisabledInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["radio_button_label_disabled"] as String)
2023-05-18 18:52:48 +00:00
..infoItemBGInt = parseColor(json["colors"]["info_item_bg"] as String)
..infoItemLabelInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["info_item_label"] as String)
2023-05-18 18:52:48 +00:00
..infoItemTextInt = parseColor(json["colors"]["info_item_text"] as String)
..infoItemIconsInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["info_item_icons"] as String)
2023-05-18 18:52:48 +00:00
..popupBGInt = parseColor(json["colors"]["popup_bg"] as String)
..currencyListItemBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["currency_list_item_bg"] as String)
2023-05-18 18:52:48 +00:00
..stackWalletBGInt = parseColor(json["colors"]["sw_bg"] as String)
..stackWalletMidInt = parseColor(json["colors"]["sw_mid"] as String)
..stackWalletBottomInt = parseColor(json["colors"]["sw_bottom"] as String)
..bottomNavShadowInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["bottom_nav_shadow"] as String)
2023-05-18 18:52:48 +00:00
..splashInt = parseColor(json["colors"]["splash"] as String)
..highlightInt = parseColor(json["colors"]["highlight"] as String)
..warningForegroundInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["warning_foreground"] as String)
2023-05-18 18:52:48 +00:00
..warningBackgroundInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["warning_background"] as String)
2023-05-18 18:52:48 +00:00
..loadingOverlayTextColorInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["loading_overlay_text_color"] as String)
2023-05-18 18:52:48 +00:00
..myStackContactIconBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["my_stack_contact_icon_bg"] as String)
2023-05-18 18:52:48 +00:00
..textConfirmTotalAmountInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_confirm_total_amount"] as String)
2023-05-18 18:52:48 +00:00
..textSelectedWordTableItemInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["text_selected_word_table_iterm"] as String)
2023-05-18 18:52:48 +00:00
..favoriteStarActiveInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["favorite_star_active"] as String)
2023-05-18 18:52:48 +00:00
..favoriteStarInactiveInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["favorite_star_inactive"] as String)
2023-05-18 18:52:48 +00:00
..rateTypeToggleColorOnInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["rate_type_toggle_color_on"] as String)
2023-05-18 18:52:48 +00:00
..rateTypeToggleColorOffInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["rate_type_toggle_color_off"] as String)
2023-05-18 18:52:48 +00:00
..rateTypeToggleDesktopColorOnInt = parseColor(
json["colors"]["rate_type_toggle_desktop_color_on"] as String,
)
2023-05-18 18:52:48 +00:00
..rateTypeToggleDesktopColorOffInt = parseColor(
json["colors"]["rate_type_toggle_desktop_color_off"] as String,
)
2023-05-18 18:52:48 +00:00
..ethTagTextInt = parseColor(json["colors"]["eth_tag_text"] as String)
..ethTagBGInt = parseColor(json["colors"]["eth_tag_bg"] as String)
..ethWalletTagTextInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["eth_wallet_tag_text"] as String)
2023-05-18 18:52:48 +00:00
..ethWalletTagBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["eth_wallet_tag_bg"] as String)
2023-05-18 18:52:48 +00:00
..tokenSummaryTextPrimaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["token_summary_text_primary"] as String)
2023-05-18 18:52:48 +00:00
..tokenSummaryTextSecondaryInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["token_summary_text_secondary"] as String)
2023-05-18 18:52:48 +00:00
..tokenSummaryBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["token_summary_bg"] as String)
2023-05-18 18:52:48 +00:00
..tokenSummaryButtonBGInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["token_summary_button_bg"] as String)
2023-05-18 18:52:48 +00:00
..tokenSummaryIconInt =
2024-05-14 16:26:03 +00:00
parseColor(json["colors"]["token_summary_icon"] as String);
2023-04-18 16:46:04 +00:00
}
2023-04-20 15:32:50 +00:00
/// Grab the int value of the hex color string.
/// 8 char string value expected where the first 2 are opacity
static int parseColor(String colorHex) {
try {
final int colorValue = colorHex.toBigIntFromHex.toInt();
if (colorValue >= 0 && colorValue <= 0xFFFFFFFF) {
return colorValue;
} else {
throw ArgumentError(
'"$colorHex" and corresponding int '
2024-05-14 16:26:03 +00:00
'value "$colorValue" is not a valid color.',
2023-04-20 15:32:50 +00:00
);
}
} catch (_) {
throw ArgumentError(
'"$colorHex" is not a valid hex number',
);
}
}
/// parse coin colors json and fetch color or use default
2024-05-15 21:20:45 +00:00
static Map<String, Color> parseCoinColors(String jsonString) {
2023-04-18 16:46:04 +00:00
final json = jsonDecode(jsonString) as Map;
final map = Map<String, dynamic>.from(json);
2024-05-15 21:20:45 +00:00
final Map<String, Color> result = {};
2023-04-18 16:46:04 +00:00
for (final mainNetId in Coins.enabled.map((e) => e.mainNetId)) {
2024-05-15 21:20:45 +00:00
if (map[mainNetId] is String) {
result[mainNetId] = Color(
(map[mainNetId] as String).toBigIntFromHex.toInt(),
2023-04-18 16:46:04 +00:00
);
} else {
2024-05-14 16:26:03 +00:00
Logging.instance.log(
2024-05-15 21:20:45 +00:00
"Color not found in theme for $mainNetId",
2024-05-14 16:26:03 +00:00
level: LogLevel.Error,
);
2023-04-18 16:46:04 +00:00
}
}
return result;
}
2023-04-20 16:12:57 +00:00
}
2023-04-20 15:32:50 +00:00
@Embedded(inheritance: false)
2023-05-18 18:52:48 +00:00
class ThemeAssets implements IThemeAssets {
@override
late final String bellNew;
2023-05-18 18:52:48 +00:00
@override
late final String buy;
2023-05-18 18:52:48 +00:00
@override
late final String exchange;
2023-05-18 18:52:48 +00:00
@override
late final String personaIncognito;
2023-05-18 18:52:48 +00:00
@override
late final String personaEasy;
2023-05-18 18:52:48 +00:00
@override
late final String stack;
2023-05-18 18:52:48 +00:00
@override
late final String stackIcon;
2023-05-18 18:52:48 +00:00
@override
late final String receive;
2023-05-18 18:52:48 +00:00
@override
late final String receivePending;
2023-05-18 18:52:48 +00:00
@override
late final String receiveCancelled;
2023-05-18 18:52:48 +00:00
@override
late final String send;
2023-05-18 18:52:48 +00:00
@override
late final String sendPending;
2023-05-18 18:52:48 +00:00
@override
late final String sendCancelled;
2023-05-18 18:52:48 +00:00
@override
late final String themeSelector;
2023-05-18 18:52:48 +00:00
@override
late final String themePreview;
2023-05-18 18:52:48 +00:00
@override
late final String txExchange;
2023-05-18 18:52:48 +00:00
@override
late final String txExchangePending;
2023-05-18 18:52:48 +00:00
@override
late final String txExchangeFailed;
2023-05-18 18:52:48 +00:00
late final String bitcoin;
late final String litecoin;
late final String bitcoincash;
late final String dogecoin;
late final String epicCash;
late final String ethereum;
late final String firo;
late final String monero;
late final String wownero;
late final String namecoin;
late final String particl;
late final String bitcoinImage;
late final String bitcoincashImage;
late final String dogecoinImage;
late final String epicCashImage;
late final String ethereumImage;
late final String firoImage;
late final String litecoinImage;
late final String moneroImage;
late final String wowneroImage;
late final String namecoinImage;
late final String particlImage;
late final String bitcoinImageSecondary;
late final String bitcoincashImageSecondary;
late final String dogecoinImageSecondary;
late final String epicCashImageSecondary;
late final String ethereumImageSecondary;
late final String firoImageSecondary;
late final String litecoinImageSecondary;
late final String moneroImageSecondary;
late final String wowneroImageSecondary;
late final String namecoinImageSecondary;
late final String particlImageSecondary;
2023-05-18 18:52:48 +00:00
@override
late final String? loadingGif;
2023-05-18 18:52:48 +00:00
@override
late final String? background;
2023-04-20 15:32:50 +00:00
ThemeAssets();
2023-04-20 15:32:50 +00:00
factory ThemeAssets.fromJson({
required Map<String, dynamic> json,
required String themeId,
2023-04-20 15:32:50 +00:00
}) {
return ThemeAssets()
2023-07-04 00:25:18 +00:00
..bellNew = "$themeId/assets/${json["bell_new"] as String}"
..buy = "$themeId/assets/${json["buy"] as String}"
..exchange = "$themeId/assets/${json["exchange"] as String}"
..personaIncognito =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["persona_incognito"] as String}"
..personaEasy = "$themeId/assets/${json["persona_easy"] as String}"
..stack = "$themeId/assets/${json["stack"] as String}"
..stackIcon = "$themeId/assets/${json["stack_icon"] as String}"
..receive = "$themeId/assets/${json["receive"] as String}"
..receivePending = "$themeId/assets/${json["receive_pending"] as String}"
..receiveCancelled =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["receive_cancelled"] as String}"
..send = "$themeId/assets/${json["send"] as String}"
..sendPending = "$themeId/assets/${json["send_pending"] as String}"
..sendCancelled = "$themeId/assets/${json["send_cancelled"] as String}"
..themeSelector = "$themeId/assets/${json["theme_selector"] as String}"
..themePreview = "$themeId/assets/${json["theme_preview"] as String}"
..txExchange = "$themeId/assets/${json["tx_exchange"] as String}"
..txExchangePending =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["tx_exchange_pending"] as String}"
..txExchangeFailed =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["tx_exchange_failed"] as String}"
..bitcoin = "$themeId/assets/${json["bitcoin"] as String}"
..litecoin = "$themeId/assets/${json["litecoin"] as String}"
..bitcoincash = "$themeId/assets/${json["bitcoincash"] as String}"
..dogecoin = "$themeId/assets/${json["dogecoin"] as String}"
..epicCash = "$themeId/assets/${json["epicCash"] as String}"
..ethereum = "$themeId/assets/${json["ethereum"] as String}"
..firo = "$themeId/assets/${json["firo"] as String}"
..monero = "$themeId/assets/${json["monero"] as String}"
..wownero = "$themeId/assets/${json["wownero"] as String}"
..namecoin = "$themeId/assets/${json["namecoin"] as String}"
..particl = "$themeId/assets/${json["particl"] as String}"
..bitcoinImage = "$themeId/assets/${json["bitcoin_image"] as String}"
..bitcoincashImage =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["bitcoincash_image"] as String}"
..dogecoinImage = "$themeId/assets/${json["dogecoin_image"] as String}"
..epicCashImage = "$themeId/assets/${json["epicCash_image"] as String}"
..ethereumImage = "$themeId/assets/${json["ethereum_image"] as String}"
..firoImage = "$themeId/assets/${json["firo_image"] as String}"
..litecoinImage = "$themeId/assets/${json["litecoin_image"] as String}"
..moneroImage = "$themeId/assets/${json["monero_image"] as String}"
..wowneroImage = "$themeId/assets/${json["wownero_image"] as String}"
..namecoinImage = "$themeId/assets/${json["namecoin_image"] as String}"
..particlImage = "$themeId/assets/${json["particl_image"] as String}"
..bitcoinImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["bitcoin_image_secondary"] as String}"
..bitcoincashImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["bitcoincash_image_secondary"] as String}"
..dogecoinImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["dogecoin_image_secondary"] as String}"
..epicCashImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["epicCash_image_secondary"] as String}"
..ethereumImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["ethereum_image_secondary"] as String}"
..firoImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["firo_image_secondary"] as String}"
..litecoinImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["litecoin_image_secondary"] as String}"
..moneroImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["monero_image_secondary"] as String}"
..wowneroImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["wownero_image_secondary"] as String}"
..namecoinImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["namecoin_image_secondary"] as String}"
..particlImageSecondary =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["particl_image_secondary"] as String}"
2023-05-09 23:18:27 +00:00
..loadingGif = json["loading_gif"] is String
2023-07-04 00:25:18 +00:00
? "$themeId/assets/${json["loading_gif"] as String}"
: null
2023-05-09 23:18:27 +00:00
..background = json["background"] is String
2023-07-04 00:25:18 +00:00
? "$themeId/assets/${json["background"] as String}"
: null;
2023-04-20 15:32:50 +00:00
}
}
2023-05-18 18:52:48 +00:00
@Embedded(inheritance: false)
class ThemeAssetsV2 implements IThemeAssets {
@override
late final String bellNew;
@override
late final String buy;
@override
late final String exchange;
@override
late final String personaIncognito;
@override
late final String personaEasy;
@override
late final String stack;
@override
late final String stackIcon;
@override
late final String receive;
@override
late final String receivePending;
@override
late final String receiveCancelled;
@override
late final String send;
@override
late final String sendPending;
@override
late final String sendCancelled;
@override
late final String themeSelector;
@override
late final String themePreview;
@override
late final String txExchange;
@override
late final String txExchangePending;
@override
late final String txExchangeFailed;
@override
late final String? loadingGif;
@override
late final String? background;
late final String coinPlaceholder;
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String> get coinIcons => _coinIcons ??= parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
coinIconsString,
placeHolder: coinPlaceholder,
);
2023-05-18 18:52:48 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinIcons;
2023-05-18 18:52:48 +00:00
late final String coinIconsString;
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String> get coinImages => _coinImages ??= parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
coinImagesString,
placeHolder: coinPlaceholder,
);
2023-05-18 18:52:48 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinImages;
2023-05-18 18:52:48 +00:00
late final String coinImagesString;
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String> get coinSecondaryImages =>
2023-05-18 18:52:48 +00:00
_coinSecondaryImages ??= parseCoinAssetsString(
coinSecondaryImagesString,
placeHolder: coinPlaceholder,
);
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinSecondaryImages;
2023-05-18 18:52:48 +00:00
late final String coinSecondaryImagesString;
2023-06-08 16:35:44 +00:00
ThemeAssetsV2();
factory ThemeAssetsV2.fromJson({
required Map<String, dynamic> json,
required String themeId,
}) {
return ThemeAssetsV2()
2023-07-04 00:25:18 +00:00
..bellNew = "$themeId/assets/${json["bell_new"] as String}"
..buy = "$themeId/assets/${json["buy"] as String}"
..exchange = "$themeId/assets/${json["exchange"] as String}"
2023-06-08 16:35:44 +00:00
..personaIncognito =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["persona_incognito"] as String}"
..personaEasy = "$themeId/assets/${json["persona_easy"] as String}"
..stack = "$themeId/assets/${json["stack"] as String}"
..stackIcon = "$themeId/assets/${json["stack_icon"] as String}"
..receive = "$themeId/assets/${json["receive"] as String}"
..receivePending = "$themeId/assets/${json["receive_pending"] as String}"
2023-06-08 16:35:44 +00:00
..receiveCancelled =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["receive_cancelled"] as String}"
..send = "$themeId/assets/${json["send"] as String}"
..sendPending = "$themeId/assets/${json["send_pending"] as String}"
..sendCancelled = "$themeId/assets/${json["send_cancelled"] as String}"
..themeSelector = "$themeId/assets/${json["theme_selector"] as String}"
..themePreview = "$themeId/assets/${json["theme_preview"] as String}"
..txExchange = "$themeId/assets/${json["tx_exchange"] as String}"
2023-06-08 16:35:44 +00:00
..txExchangePending =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["tx_exchange_pending"] as String}"
2023-06-08 16:35:44 +00:00
..txExchangeFailed =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["tx_exchange_failed"] as String}"
2023-06-08 16:35:44 +00:00
..coinPlaceholder =
2023-07-04 00:25:18 +00:00
"$themeId/assets/${json["coin_placeholder"] as String}"
2023-06-08 16:35:44 +00:00
..coinIconsString = createCoinAssetsString(
2023-07-04 00:25:18 +00:00
"$themeId/assets",
2023-06-08 16:35:44 +00:00
Map<String, dynamic>.from(json["coins"]["icons"] as Map),
)
..coinImagesString = createCoinAssetsString(
2023-07-04 00:25:18 +00:00
"$themeId/assets",
2023-06-08 16:35:44 +00:00
Map<String, dynamic>.from(json["coins"]["images"] as Map),
)
..coinSecondaryImagesString = createCoinAssetsString(
2023-07-04 00:25:18 +00:00
"$themeId/assets",
2023-06-08 16:35:44 +00:00
Map<String, dynamic>.from(json["coins"]["secondaries"] as Map),
)
..loadingGif = json["loading_gif"] is String
2023-07-04 00:25:18 +00:00
? "$themeId/assets/${json["loading_gif"] as String}"
2023-06-08 16:35:44 +00:00
: null
..background = json["background"] is String
2023-07-04 00:25:18 +00:00
? "$themeId/assets/${json["background"] as String}"
2023-06-08 16:35:44 +00:00
: null;
}
static String createCoinAssetsString(String path, Map<String, dynamic> json) {
final Map<String, dynamic> map = {};
for (final entry in json.entries) {
map[entry.key] = "$path/${entry.value as String}";
}
return jsonEncode(map);
}
2024-05-15 21:20:45 +00:00
static Map<String, String> parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
String jsonString, {
required String placeHolder,
}) {
2023-06-08 16:35:44 +00:00
final json = jsonDecode(jsonString) as Map;
final map = Map<String, dynamic>.from(json);
2024-05-15 21:20:45 +00:00
final Map<String, String> result = {};
2023-06-08 16:35:44 +00:00
for (final coin in Coins.enabled) {
2024-05-15 21:20:45 +00:00
result[coin.mainNetId] = map[coin.mainNetId] as String? ?? placeHolder;
2023-06-08 16:35:44 +00:00
}
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, '
')';
}
}
@Embedded(inheritance: false)
class ThemeAssetsV3 implements IThemeAssets {
2023-07-04 00:25:18 +00:00
@Name("bellNew")
late final String bellNewRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get bellNew => prependIfNeeded(bellNewRelative);
@Name("buy")
late final String buyRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get buy => prependIfNeeded(buyRelative);
@Name("exchange")
late final String exchangeRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get exchange => prependIfNeeded(exchangeRelative);
@Name("personaIncognito")
late final String personaIncognitoRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get personaIncognito => prependIfNeeded(personaIncognitoRelative);
@Name("personaEasy")
late final String personaEasyRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get personaEasy => prependIfNeeded(personaEasyRelative);
@Name("stack")
late final String stackRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get stack => prependIfNeeded(stackRelative);
@Name("stackIcon")
late final String stackIconRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get stackIcon => prependIfNeeded(stackIconRelative);
@Name("receive")
late final String receiveRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get receive => prependIfNeeded(receiveRelative);
@Name("receivePending")
late final String receivePendingRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get receivePending => prependIfNeeded(receivePendingRelative);
@Name("receiveCancelled")
late final String receiveCancelledRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get receiveCancelled => prependIfNeeded(receiveCancelledRelative);
@Name("send")
late final String sendRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get send => prependIfNeeded(sendRelative);
@Name("sendPending")
late final String sendPendingRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get sendPending => prependIfNeeded(sendPendingRelative);
@Name("sendCancelled")
late final String sendCancelledRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get sendCancelled => prependIfNeeded(sendCancelledRelative);
@Name("themeSelector")
late final String themeSelectorRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get themeSelector => prependIfNeeded(themeSelectorRelative);
@Name("themePreview")
late final String themePreviewRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get themePreview => prependIfNeeded(themePreviewRelative);
@Name("txExchange")
late final String txExchangeRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get txExchange => prependIfNeeded(txExchangeRelative);
@Name("txExchangePending")
late final String txExchangePendingRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get txExchangePending => prependIfNeeded(txExchangePendingRelative);
@Name("txExchangeFailed")
late final String txExchangeFailedRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String get txExchangeFailed => prependIfNeeded(txExchangeFailedRelative);
@Name("loadingGif")
late final String? loadingGifRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String? get loadingGif =>
loadingGifRelative != null ? prependIfNeeded(loadingGifRelative!) : null;
@Name("background")
late final String? backgroundRelative;
2023-06-08 16:35:44 +00:00
@override
2023-07-04 00:25:18 +00:00
@ignore
String? get background =>
backgroundRelative != null ? prependIfNeeded(backgroundRelative!) : null;
2023-06-08 16:35:44 +00:00
2023-07-04 00:25:18 +00:00
@Name("coinPlaceholder")
late final String coinPlaceholderRelative;
@ignore
String get coinPlaceholder => prependIfNeeded(coinPlaceholderRelative);
2023-06-08 16:35:44 +00:00
// Added some future proof params in case we want to add anything else
// This should provide some buffer in stead of creating assetsV4 etc
@Name("otherStringParam2")
late final String? dummy2;
@Name("otherStringParam3")
late final String? dummy3;
2023-07-25 13:58:29 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String> get coinIcons => _coinIcons ??= parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
coinIconsString,
placeHolder: coinPlaceholder,
);
2023-07-25 13:58:29 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinIcons;
2023-07-25 13:58:29 +00:00
late final String coinIconsString;
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String> get coinImages => _coinImages ??= parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
coinImagesString,
placeHolder: coinPlaceholder,
);
2023-07-25 13:58:29 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinImages;
2023-07-25 13:58:29 +00:00
late final String coinImagesString;
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String> get coinSecondaryImages =>
2023-07-25 13:58:29 +00:00
_coinSecondaryImages ??= parseCoinAssetsString(
coinSecondaryImagesString,
placeHolder: coinPlaceholder,
);
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinSecondaryImages;
2023-07-25 13:58:29 +00:00
late final String coinSecondaryImagesString;
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? get coinCardImages =>
2023-07-25 13:58:29 +00:00
_coinCardImages ??= coinCardImagesString == null
? null
: parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
coinCardImagesString!,
placeHolder: coinPlaceholder,
);
2023-07-25 13:58:29 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinCardImages;
2023-07-25 13:58:29 +00:00
late final String? coinCardImagesString;
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? get coinCardFavoritesImages =>
2023-07-25 13:58:29 +00:00
_coinCardFavoritesImages ??= coinCardFavoritesImagesString == null
? null
: parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
coinCardFavoritesImagesString!,
placeHolder: coinPlaceholder,
);
2023-07-25 13:58:29 +00:00
@ignore
2024-05-15 21:20:45 +00:00
Map<String, String>? _coinCardFavoritesImages;
2023-07-25 13:58:29 +00:00
@Name("otherStringParam1")
late final String? coinCardFavoritesImagesString;
ThemeAssetsV3();
2023-07-25 13:58:29 +00:00
factory ThemeAssetsV3.fromJson({
2023-07-25 13:58:29 +00:00
required Map<String, dynamic> json,
required String themeId,
}) {
return ThemeAssetsV3()
2023-07-25 13:58:29 +00:00
..bellNewRelative = "$themeId/assets/${json["bell_new"] as String}"
..buyRelative = "$themeId/assets/${json["buy"] as String}"
..exchangeRelative = "$themeId/assets/${json["exchange"] as String}"
..personaIncognitoRelative =
"$themeId/assets/${json["persona_incognito"] as String}"
..personaEasyRelative =
"$themeId/assets/${json["persona_easy"] as String}"
..stackRelative = "$themeId/assets/${json["stack"] as String}"
..stackIconRelative = "$themeId/assets/${json["stack_icon"] as String}"
..receiveRelative = "$themeId/assets/${json["receive"] as String}"
..receivePendingRelative =
"$themeId/assets/${json["receive_pending"] as String}"
..receiveCancelledRelative =
"$themeId/assets/${json["receive_cancelled"] as String}"
..sendRelative = "$themeId/assets/${json["send"] as String}"
..sendPendingRelative =
"$themeId/assets/${json["send_pending"] as String}"
..sendCancelledRelative =
"$themeId/assets/${json["send_cancelled"] as String}"
..themeSelectorRelative =
"$themeId/assets/${json["theme_selector"] as String}"
..themePreviewRelative =
"$themeId/assets/${json["theme_preview"] as String}"
..txExchangeRelative = "$themeId/assets/${json["tx_exchange"] as String}"
..txExchangePendingRelative =
"$themeId/assets/${json["tx_exchange_pending"] as String}"
..txExchangeFailedRelative =
"$themeId/assets/${json["tx_exchange_failed"] as String}"
..coinPlaceholderRelative =
"$themeId/assets/${json["coin_placeholder"] as String}"
..coinIconsString = createCoinAssetsString(
"$themeId/assets",
Map<String, dynamic>.from(json["coins"]["icons"] as Map),
)
..coinImagesString = createCoinAssetsString(
"$themeId/assets",
Map<String, dynamic>.from(json["coins"]["images"] as Map),
)
..coinSecondaryImagesString = createCoinAssetsString(
"$themeId/assets",
Map<String, dynamic>.from(json["coins"]["secondaries"] as Map),
)
..coinCardImagesString = json["coins"]["cards"] is Map
? createCoinAssetsString(
2024-05-14 16:26:03 +00:00
"$themeId/assets",
Map<String, dynamic>.from(json["coins"]["cards"] as Map),
)
2023-07-25 13:58:29 +00:00
: null
..coinCardFavoritesImagesString = json["coins"]["favoriteCards"] is Map
? createCoinAssetsString(
2024-05-14 16:26:03 +00:00
"$themeId/assets",
Map<String, dynamic>.from(json["coins"]["favoriteCards"] as Map),
)
2023-07-25 13:58:29 +00:00
: null
..loadingGifRelative = json["loading_gif"] is String
? "$themeId/assets/${json["loading_gif"] as String}"
: null
..backgroundRelative = json["background"] is String
? "$themeId/assets/${json["background"] as String}"
: null
..dummy2 = null
..dummy3 = null;
}
static String prependIfNeeded(String relativePath) {
final path = StackFileSystem.themesDir!.path;
if (relativePath.startsWith(path)) {
return relativePath;
} else {
if (Platform.isIOS) {
const pattern = "/var/mobile/Containers/Data/Application/";
if (relativePath.startsWith(pattern)) {
final parts = relativePath.split("/Library/themes/");
if (parts.isNotEmpty) {
return "$path/${parts.last}";
}
}
}
return "$path/$relativePath";
}
}
static String createCoinAssetsString(String path, Map<String, dynamic> json) {
final Map<String, dynamic> map = {};
for (final entry in json.entries) {
map[entry.key] = "$path/${entry.value as String}";
}
return jsonEncode(map);
}
2024-05-15 21:20:45 +00:00
static Map<String, String> parseCoinAssetsString(
2024-05-14 16:26:03 +00:00
String jsonString, {
required String placeHolder,
}) {
2023-07-25 13:58:29 +00:00
final json = jsonDecode(jsonString) as Map;
final map = Map<String, dynamic>.from(json);
2024-05-15 21:20:45 +00:00
final Map<String, String> result = {};
2023-07-25 13:58:29 +00:00
for (final coin in Coins.enabled) {
2024-05-15 21:20:45 +00:00
result[coin.mainNetId] = map[coin.mainNetId] as String? ?? placeHolder;
result[coin.mainNetId] = prependIfNeeded(result[coin.mainNetId]!);
2023-07-25 13:58:29 +00:00
}
return result;
}
@override
String toString() {
return 'ThemeAssetsV3('
2023-07-25 13:58:29 +00:00
'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, '
2023-06-05 22:25:41 +00:00
'txExchangePending: $txExchangePending, '
'txExchangeFailed: $txExchangeFailed, '
'loadingGif: $loadingGif, '
'background: $background, '
'coinPlaceholder: $coinPlaceholder, '
'coinIcons: $coinIcons, '
'coinImages: $coinImages, '
2023-06-07 20:34:27 +00:00
'coinSecondaryImages: $coinSecondaryImages, '
'coinCardImages: $coinCardImages'
'coinCardFavoritesImages: $coinCardFavoritesImages'
2023-06-05 22:25:41 +00:00
')';
}
2023-05-18 18:52:48 +00:00
}
abstract class IThemeAssets {
String get bellNew;
String get buy;
String get exchange;
String get personaIncognito;
String get personaEasy;
String get stack;
String get stackIcon;
String get receive;
String get receivePending;
String get receiveCancelled;
String get send;
String get sendPending;
String get sendCancelled;
String get themeSelector;
String get themePreview;
String get txExchange;
String get txExchangePending;
String get txExchangeFailed;
String? get loadingGif;
String? get background;
2024-05-14 16:26:03 +00:00
}