stack privacy

This commit is contained in:
Marco 2022-10-19 09:34:04 -06:00
parent 2ee8dd417a
commit 5da68eb857

View file

@ -6,7 +6,6 @@ import 'package:stackwallet/pages_desktop_specific/create_password/create_passwo
import 'package:stackwallet/providers/global/prefs_provider.dart'; import 'package:stackwallet/providers/global/prefs_provider.dart';
import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/prefs.dart';
import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart'; import 'package:stackwallet/utilities/util.dart';
@ -218,7 +217,6 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
children: [ children: [
Expanded( Expanded(
child: RawMaterialButton( child: RawMaterialButton(
elevation: 0,
fillColor: Theme.of(context).extension<StackColors>()!.popupBG, fillColor: Theme.of(context).extension<StackColors>()!.popupBG,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
side: !externalCallsEnabled side: !externalCallsEnabled
@ -250,14 +248,11 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Padding( SvgPicture.asset(
padding: const EdgeInsets.all(16.0),
child: SvgPicture.asset(
Assets.svg.personaEasy, Assets.svg.personaEasy,
width: 140, width: 140,
height: 140, height: 140,
), ),
),
Center( Center(
child: Text( child: Text(
"Easy Crypto", "Easy Crypto",
@ -343,14 +338,11 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Padding( SvgPicture.asset(
padding: const EdgeInsets.all(16.0),
child: SvgPicture.asset(
Assets.svg.personaIncognito, Assets.svg.personaIncognito,
width: 140, width: 140,
height: 140, height: 140,
), ),
),
Center( Center(
child: Text( child: Text(
"Incognito", "Incognito",
@ -409,8 +401,8 @@ class ContinueButton extends ConsumerWidget {
const ContinueButton({ const ContinueButton({
Key? key, Key? key,
required this.isDesktop, required this.isDesktop,
required this.isSettings, required this.onPressed,
required this.isEasy, required this.label,
}) : super(key: key); }) : super(key: key);
final String label; final String label;
@ -419,50 +411,33 @@ class ContinueButton extends ConsumerWidget {
@override @override
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
return !isDesktop if (isDesktop) {
? TextButton( return SizedBox(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: () {
print("Output of isEasy:");
print(isEasy);
ref.read(prefsChangeNotifierProvider).externalCalls = isEasy;
!isSettings
? Navigator.of(context).pushNamed(CreatePinView.routeName)
: Navigator.of(context).pop();
},
child: Text(
!isSettings ? "Continue" : "Save changes",
style: STextStyles.button(context),
),
)
: SizedBox(
width: 328, width: 328,
height: 70, height: 70,
child: TextButton( child: TextButton(
style: Theme.of(context) style: Theme.of(context)
.extension<StackColors>()! .extension<StackColors>()!
.getPrimaryEnabledButtonColor(context), .getPrimaryEnabledButtonColor(context),
onPressed: () { onPressed: onPressed,
print("Output of isEasy:");
print(isEasy);
ref.read(prefsChangeNotifierProvider).externalCalls = isEasy;
!isSettings
? Navigator.of(context)
.pushNamed(CreatePasswordView.routeName)
: Navigator.of(context).pop();
},
child: Text( child: Text(
!isSettings ? "Continue" : "Save changes", label,
style: STextStyles.button(context).copyWith(fontSize: 20), style: STextStyles.button(context).copyWith(fontSize: 20),
), ),
), ),
); );
} else {
return TextButton(
style: Theme.of(context)
.extension<StackColors>()!
.getPrimaryEnabledButtonColor(context),
onPressed: onPressed,
child: Text(
label,
style: STextStyles.button(context),
),
);
}
} }
} }