add button to show tor warning dialog in hidden settings menu

This commit is contained in:
sneurlax 2024-04-17 13:18:15 -05:00
parent 30255c665e
commit 39a9dc83db

View file

@ -10,7 +10,6 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -20,9 +19,11 @@ import 'package:stackwallet/providers/providers.dart';
import 'package:stackwallet/themes/stack_colors.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/constants.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/widgets/background.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/dialogs/tor_warning_dialog.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart';
class HiddenSettings extends StatelessWidget {
@ -246,24 +247,23 @@ class HiddenSettings extends StatelessWidget {
}
},
),
const SizedBox(
height: 12,
),
Consumer(
builder: (_, ref, __) {
return GestureDetector(
onTap: () async {
ref
.read(prefsChangeNotifierProvider)
.frostEnabled =
!(ref
.read(prefsChangeNotifierProvider)
.frostEnabled);
if (kDebugMode) {
print(
"FROST enabled: ${ref.read(prefsChangeNotifierProvider).frostEnabled}");
}
await showDialog<bool>(
context: context,
builder: (_) => TorWarningDialog(
coin: Coin.stellar,
),
);
},
child: RoundedWhiteContainer(
child: Text(
"Toggle FROST multisig",
"Show Tor warning popup",
style: STextStyles.button(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!