move persona-easy/incognito to theme files
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
1
assets/svg/forest/persona-easy-1.svg
Normal file
After Width: | Height: | Size: 8.2 KiB |
1
assets/svg/forest/persona-incognito-1.svg
Normal file
After Width: | Height: | Size: 11 KiB |
1
assets/svg/fruitSorbet/persona-easy-1.svg
Normal file
After Width: | Height: | Size: 8.2 KiB |
1
assets/svg/fruitSorbet/persona-incognito-1.svg
Normal file
After Width: | Height: | Size: 11 KiB |
1
assets/svg/light/persona-easy-1.svg
Normal file
After Width: | Height: | Size: 8.2 KiB |
1
assets/svg/light/persona-incognito-1.svg
Normal file
After Width: | Height: | Size: 11 KiB |
1
assets/svg/oceanBreeze/persona-easy-1.svg
Normal file
After Width: | Height: | Size: 8.2 KiB |
1
assets/svg/oceanBreeze/persona-incognito-1.svg
Normal file
After Width: | Height: | Size: 11 KiB |
1
assets/svg/oledBlack/persona-easy-1.svg
Normal file
After Width: | Height: | Size: 8.2 KiB |
1
assets/svg/oledBlack/persona-incognito-1.svg
Normal file
After Width: | Height: | Size: 11 KiB |
|
@ -21,6 +21,8 @@ import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
|||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
|
||||
import '../providers/ui/color_theme_provider.dart';
|
||||
|
||||
class StackPrivacyCalls extends ConsumerStatefulWidget {
|
||||
const StackPrivacyCalls({
|
||||
Key? key,
|
||||
|
@ -39,11 +41,13 @@ class _StackPrivacyCalls extends ConsumerState<StackPrivacyCalls> {
|
|||
late final bool isDesktop;
|
||||
late bool isEasy;
|
||||
late bool infoToggle;
|
||||
late final bool usePNG;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
isDesktop = Util.isDesktop;
|
||||
isEasy = ref.read(prefsChangeNotifierProvider).externalCalls;
|
||||
usePNG = ref.read(colorThemeProvider.state).state == "fruitSorbet";
|
||||
infoToggle = isEasy;
|
||||
super.initState();
|
||||
}
|
||||
|
@ -277,7 +281,7 @@ class _StackPrivacyCalls extends ConsumerState<StackPrivacyCalls> {
|
|||
}
|
||||
}
|
||||
|
||||
class PrivacyToggle extends StatefulWidget {
|
||||
class PrivacyToggle extends ConsumerStatefulWidget {
|
||||
const PrivacyToggle({
|
||||
Key? key,
|
||||
required this.externalCallsEnabled,
|
||||
|
@ -288,17 +292,19 @@ class PrivacyToggle extends StatefulWidget {
|
|||
final void Function(bool)? onChanged;
|
||||
|
||||
@override
|
||||
State<PrivacyToggle> createState() => _PrivacyToggleState();
|
||||
ConsumerState<PrivacyToggle> createState() => _PrivacyToggleState();
|
||||
}
|
||||
|
||||
class _PrivacyToggleState extends State<PrivacyToggle> {
|
||||
class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||
late bool externalCallsEnabled;
|
||||
|
||||
late final bool isDesktop;
|
||||
late final bool usePNG;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
isDesktop = Util.isDesktop;
|
||||
usePNG = ref.read(colorThemeProvider.state).state == "fruitSorbet";
|
||||
// initial toggle state
|
||||
externalCallsEnabled = widget.externalCallsEnabled;
|
||||
super.initState();
|
||||
|
@ -346,6 +352,9 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
|
|||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
// Image.asset(
|
||||
// // Assets.png.personaEasy,
|
||||
// ),
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaEasy,
|
||||
width: isDesktop ? 120 : 140,
|
||||
|
@ -452,7 +461,7 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
|
|||
height: 10,
|
||||
),
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaIncognito,
|
||||
Assets.svg.personaIncognito(context),
|
||||
width: isDesktop ? 120 : 140,
|
||||
height: isDesktop ? 120 : 140,
|
||||
),
|
||||
|
|
|
@ -263,7 +263,7 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
|
|||
height: 10,
|
||||
),
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaEasy,
|
||||
Assets.svg.personaEasy(context),
|
||||
width: 120,
|
||||
height: 120,
|
||||
),
|
||||
|
@ -369,7 +369,7 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
|
|||
height: 10,
|
||||
),
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaIncognito,
|
||||
Assets.svg.personaIncognito(context),
|
||||
width: 120,
|
||||
height: 120,
|
||||
),
|
||||
|
|
|
@ -94,6 +94,11 @@ class _SVG {
|
|||
String txExchangeFailed(BuildContext context) =>
|
||||
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
|
||||
|
||||
String personaIncognito(BuildContext context) =>
|
||||
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/persona-incognito-1.svg";
|
||||
String personaEasy(BuildContext context) =>
|
||||
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/persona-easy-1.svg";
|
||||
|
||||
String get themeFruit => "assets/svg/fruit-sorbet-theme.svg";
|
||||
String get themeForest => "assets/svg/forest-theme.svg";
|
||||
String get themeOledBlack => "assets/svg/oled-black-theme.svg";
|
||||
|
@ -115,8 +120,6 @@ class _SVG {
|
|||
String get enableButton => "assets/svg/enabled-button.svg";
|
||||
String get disableButton => "assets/svg/Button.svg";
|
||||
String get polygon => "assets/svg/Polygon.svg";
|
||||
String get personaIncognito => "assets/svg/persona-incognito-1.svg";
|
||||
String get personaEasy => "assets/svg/persona-easy-1.svg";
|
||||
String get drd => "assets/svg/drd-icon.svg";
|
||||
String get boxAuto => "assets/svg/box-auto.svg";
|
||||
String get plus => "assets/svg/plus.svg";
|
||||
|
|
14
pubspec.yaml
|
@ -280,8 +280,6 @@ flutter:
|
|||
- assets/svg/tx-icon-anonymize-pending.svg
|
||||
- assets/svg/tx-icon-anonymize-failed.svg
|
||||
- assets/svg/Polygon.svg
|
||||
- assets/svg/persona-easy-1.svg
|
||||
- assets/svg/persona-incognito-1.svg
|
||||
- assets/svg/Button.svg
|
||||
- assets/svg/enabled-button.svg
|
||||
- assets/svg/lock-circle.svg
|
||||
|
@ -423,6 +421,8 @@ flutter:
|
|||
- assets/svg/light/bell-new.svg
|
||||
- assets/svg/light/stack-icon1.svg
|
||||
- assets/svg/light/buy-coins-icon.svg
|
||||
- assets/svg/persona-easy-1.svg
|
||||
- assets/svg/persona-incognito-1.svg
|
||||
|
||||
# dark theme specific
|
||||
- assets/svg/dark/tx-exchange-icon.svg
|
||||
|
@ -438,6 +438,8 @@ flutter:
|
|||
- assets/svg/dark/bell-new.svg
|
||||
- assets/svg/dark/stack-icon1.svg
|
||||
- assets/svg/dark/buy-coins-icon.svg
|
||||
- assets/svg/persona-easy-1.svg
|
||||
- assets/svg/persona-incognito-1.svg
|
||||
|
||||
# ocean theme specific
|
||||
- assets/svg/oceanBreeze/tx-exchange-icon.svg
|
||||
|
@ -454,6 +456,8 @@ flutter:
|
|||
- assets/svg/oceanBreeze/stack-icon1.svg
|
||||
- assets/svg/oceanBreeze/buy-coins-icon.svg
|
||||
- assets/svg/oceanBreeze/bg.svg
|
||||
- assets/svg/persona-easy-1.svg
|
||||
- assets/svg/persona-incognito-1.svg
|
||||
|
||||
# OLED black theme specific
|
||||
- assets/svg/oledBlack/tx-exchange-icon.svg
|
||||
|
@ -469,6 +473,8 @@ flutter:
|
|||
- assets/svg/oledBlack/bell-new.svg
|
||||
- assets/svg/oledBlack/stack-icon1.svg
|
||||
- assets/svg/oledBlack/buy-coins-icon.svg
|
||||
- assets/svg/persona-easy-1.svg
|
||||
- assets/svg/persona-incognito-1.svg
|
||||
|
||||
# fruit sorbet theme specific
|
||||
- assets/svg/fruitSorbet/tx-exchange-icon.svg
|
||||
|
@ -485,6 +491,8 @@ flutter:
|
|||
- assets/svg/fruitSorbet/stack-icon1.svg
|
||||
- assets/svg/fruitSorbet/buy-coins-icon.svg
|
||||
- assets/svg/fruitSorbet/bg.svg
|
||||
- assets/svg/persona-easy-1.svg
|
||||
- assets/svg/persona-incognito-1.svg
|
||||
|
||||
# forest theme specific
|
||||
- assets/svg/forest/tx-exchange-icon.svg
|
||||
|
@ -501,6 +509,8 @@ flutter:
|
|||
- assets/svg/forest/stack-icon1.svg
|
||||
- assets/svg/forest/buy-coins-icon.svg
|
||||
- assets/svg/forest/bg.svg
|
||||
- assets/svg/persona-easy-1.svg
|
||||
- assets/svg/persona-incognito-1.svg
|
||||
|
||||
# buy
|
||||
- assets/svg/buy/Simplex-Nuvei-Logo.svg
|
||||
|
|