clean up last conditional png/svg switches
Before Width: | Height: | Size: 312 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 277 KiB |
Before Width: | Height: | Size: 255 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 232 KiB |
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 572 KiB |
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 642 KiB |
|
@ -8,12 +8,10 @@ import 'package:stackwallet/pages/pinpad_views/create_pin_view.dart';
|
|||
import 'package:stackwallet/pages_desktop_specific/password/create_password_view.dart';
|
||||
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
||||
import 'package:stackwallet/providers/global/price_provider.dart';
|
||||
import 'package:stackwallet/providers/ui/color_theme_provider.dart';
|
||||
import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
|
@ -297,16 +295,10 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
|||
late bool externalCallsEnabled;
|
||||
|
||||
late final bool isDesktop;
|
||||
late final bool isSorbet;
|
||||
late final bool isOcean;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
isDesktop = Util.isDesktop;
|
||||
isSorbet = ref.read(colorThemeProvider.state).state.themeType ==
|
||||
ThemeType.fruitSorbet;
|
||||
isOcean = ref.read(colorThemeProvider.state).state.themeType ==
|
||||
ThemeType.oceanBreeze;
|
||||
// initial toggle state
|
||||
externalCallsEnabled = widget.externalCallsEnabled;
|
||||
super.initState();
|
||||
|
@ -354,13 +346,7 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
|||
// const SizedBox(
|
||||
// height: 10,
|
||||
// ),
|
||||
(isSorbet)
|
||||
? Image.asset(
|
||||
Assets.png.personaEasy(context),
|
||||
width: 140,
|
||||
height: 140,
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaEasy(context),
|
||||
width: 140,
|
||||
height: 140,
|
||||
|
@ -465,13 +451,7 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
|||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
(isSorbet)
|
||||
? Image.asset(
|
||||
Assets.png.personaIncognito(context),
|
||||
width: 140,
|
||||
height: 140,
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaIncognito(context),
|
||||
width: 140,
|
||||
height: 140,
|
||||
|
|
|
@ -10,7 +10,6 @@ import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart
|
|||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||
|
@ -19,8 +18,6 @@ import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
|||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
|
||||
import '../../../../providers/ui/color_theme_provider.dart';
|
||||
|
||||
class StackPrivacyDialog extends ConsumerStatefulWidget {
|
||||
const StackPrivacyDialog({Key? key}) : super(key: key);
|
||||
|
||||
|
@ -215,16 +212,10 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
|||
late bool externalCallsEnabled;
|
||||
|
||||
late final bool isDesktop;
|
||||
late final bool isSorbet;
|
||||
late final bool isOcean;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
isDesktop = Util.isDesktop;
|
||||
isSorbet = ref.read(colorThemeProvider.state).state.themeType ==
|
||||
ThemeType.fruitSorbet;
|
||||
isOcean = ref.read(colorThemeProvider.state).state.themeType ==
|
||||
ThemeType.oceanBreeze;
|
||||
// initial toggle state
|
||||
externalCallsEnabled = widget.externalCallsEnabled;
|
||||
super.initState();
|
||||
|
@ -273,13 +264,7 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
|||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
(isSorbet)
|
||||
? Image.asset(
|
||||
Assets.png.personaEasy(context),
|
||||
width: 120,
|
||||
height: 120,
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaEasy(context),
|
||||
width: 120,
|
||||
height: 120,
|
||||
|
@ -385,13 +370,7 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
|||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
(isSorbet)
|
||||
? Image.asset(
|
||||
Assets.png.personaIncognito(context),
|
||||
width: 120,
|
||||
height: 120,
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
SvgPicture.asset(
|
||||
Assets.svg.personaIncognito(context),
|
||||
width: 120,
|
||||
height: 120,
|
||||
|
|
|
@ -354,11 +354,6 @@ class _PNG {
|
|||
"assets/images/${Theme.of(context).extension<StackColors>()!.themeType.name}/stack.png";
|
||||
String get splash => "assets/images/splash.png";
|
||||
|
||||
String personaIncognito(BuildContext context) =>
|
||||
"$_kPath_themed${Theme.of(context).extension<StackColors>()!.themeType.name}/persona-incognito-1.png";
|
||||
String personaEasy(BuildContext context) =>
|
||||
"$_kPath_themed${Theme.of(context).extension<StackColors>()!.themeType.name}/persona-easy-1.png";
|
||||
|
||||
String get glasses => "assets/images/glasses.png";
|
||||
String get glassesHidden => "assets/images/glasses-hidden.png";
|
||||
}
|
||||
|
|