mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
fix keys popup, add copy buttons, and add basic style
and import cleanup
This commit is contained in:
parent
445fc832a3
commit
5d1615b72e
3 changed files with 57 additions and 14 deletions
|
@ -17,6 +17,7 @@ import 'package:flutter_svg/svg.dart';
|
|||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
import 'package:stackwallet/notifications/show_flush_bar.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/new_wallet_recovery_phrase_view/sub_widgets/mnemonic_table.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/address_utils.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
|
@ -32,8 +33,6 @@ import 'package:stackwallet/widgets/detail_item.dart';
|
|||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||
|
||||
import '../../../wallet_view/transaction_views/transaction_details_view.dart';
|
||||
|
||||
class WalletBackupView extends ConsumerWidget {
|
||||
const WalletBackupView({
|
||||
Key? key,
|
||||
|
|
|
@ -89,9 +89,11 @@ class _UnlockWalletKeysDesktopState
|
|||
if (wallet is! MnemonicInterface) {
|
||||
if (wallet is BitcoinFrostWallet) {
|
||||
frostData = (
|
||||
keys: (await wallet.getMultisigConfig())!,
|
||||
keys: (await wallet.getSerializedKeys())!,
|
||||
config: (await wallet.getMultisigConfig())!,
|
||||
);
|
||||
print(1111111);
|
||||
print(frostData);
|
||||
} else {
|
||||
throw Exception("FIXME ~= see todo in code");
|
||||
}
|
||||
|
@ -325,7 +327,7 @@ class _UnlockWalletKeysDesktopState
|
|||
if (wallet is! MnemonicInterface) {
|
||||
if (wallet is BitcoinFrostWallet) {
|
||||
frostData = (
|
||||
keys: (await wallet.getMultisigConfig())!,
|
||||
keys: (await wallet.getSerializedKeys())!,
|
||||
config: (await wallet.getMultisigConfig())!,
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -14,6 +14,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:stackwallet/notifications/show_flush_bar.dart';
|
||||
import 'package:stackwallet/pages/add_wallet_views/new_wallet_recovery_phrase_view/sub_widgets/mnemonic_table.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/qr_code_desktop_popup_content.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/address_utils.dart';
|
||||
|
@ -24,6 +25,7 @@ import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
|||
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
|
||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
|
||||
class WalletKeysDesktopPopup extends StatelessWidget {
|
||||
const WalletKeysDesktopPopup({
|
||||
|
@ -83,11 +85,31 @@ class WalletKeysDesktopPopup extends StatelessWidget {
|
|||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 32,
|
||||
),
|
||||
child: SelectableText(
|
||||
frostData!.keys,
|
||||
style:
|
||||
STextStyles.desktopTextExtraExtraSmall(context),
|
||||
textAlign: TextAlign.center,
|
||||
child: RoundedWhiteContainer(
|
||||
borderColor: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFieldDefaultBG,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12, vertical: 9),
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: SelectableText(
|
||||
frostData!.keys,
|
||||
style: STextStyles.desktopTextExtraExtraSmall(
|
||||
context),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
IconCopyButton(
|
||||
data: frostData!.keys,
|
||||
)
|
||||
// TODO [prio=low: Add QR code button and dialog.
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -106,11 +128,31 @@ class WalletKeysDesktopPopup extends StatelessWidget {
|
|||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 32,
|
||||
),
|
||||
child: SelectableText(
|
||||
frostData!.config,
|
||||
style:
|
||||
STextStyles.desktopTextExtraExtraSmall(context),
|
||||
textAlign: TextAlign.center,
|
||||
child: RoundedWhiteContainer(
|
||||
borderColor: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFieldDefaultBG,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12, vertical: 9),
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: SelectableText(
|
||||
frostData!.config,
|
||||
style: STextStyles.desktopTextExtraExtraSmall(
|
||||
context),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
IconCopyButton(
|
||||
data: frostData!.config,
|
||||
)
|
||||
// TODO [prio=low: Add QR code button and dialog.
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue