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,13 +248,10 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Padding( SvgPicture.asset(
padding: const EdgeInsets.all(16.0), Assets.svg.personaEasy,
child: SvgPicture.asset( width: 140,
Assets.svg.personaEasy, height: 140,
width: 140,
height: 140,
),
), ),
Center( Center(
child: Text( child: Text(
@ -343,13 +338,10 @@ class _PrivacyToggleState extends State<PrivacyToggle> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Padding( SvgPicture.asset(
padding: const EdgeInsets.all(16.0), Assets.svg.personaIncognito,
child: SvgPicture.asset( width: 140,
Assets.svg.personaIncognito, height: 140,
width: 140,
height: 140,
),
), ),
Center( Center(
child: Text( child: Text(
@ -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) width: 328,
.extension<StackColors>()! height: 70,
.getPrimaryEnabledButtonColor(context), child: TextButton(
onPressed: () { style: Theme.of(context)
print("Output of isEasy:"); .extension<StackColors>()!
print(isEasy); .getPrimaryEnabledButtonColor(context),
onPressed: onPressed,
ref.read(prefsChangeNotifierProvider).externalCalls = isEasy; child: Text(
label,
!isSettings style: STextStyles.button(context).copyWith(fontSize: 20),
? Navigator.of(context).pushNamed(CreatePinView.routeName) ),
: Navigator.of(context).pop(); ),
}, );
child: Text( } else {
!isSettings ? "Continue" : "Save changes", return TextButton(
style: STextStyles.button(context), style: Theme.of(context)
), .extension<StackColors>()!
) .getPrimaryEnabledButtonColor(context),
: SizedBox( onPressed: onPressed,
width: 328, child: Text(
height: 70, label,
child: TextButton( style: STextStyles.button(context),
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(CreatePasswordView.routeName)
: Navigator.of(context).pop();
},
child: Text(
!isSettings ? "Continue" : "Save changes",
style: STextStyles.button(context).copyWith(fontSize: 20),
),
),
);
} }
} }