Skip to content

Commit 08b40c4

Browse files
committed
add copy icon to top right of xpub view
1 parent 2038fbc commit 08b40c4

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

lib/pages/settings_views/global_settings_view/xpub_view.dart

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'dart:async';
33
import 'package:flutter/material.dart';
44
import 'package:flutter/services.dart';
55
import 'package:flutter_riverpod/flutter_riverpod.dart';
6+
import 'package:flutter_svg/svg.dart';
67
import 'package:qr_flutter/qr_flutter.dart';
78
import 'package:stackwallet/notifications/show_flush_bar.dart';
89
import 'package:stackwallet/utilities/assets.dart';
@@ -59,16 +60,39 @@ class _XPubViewState extends ConsumerState<XPubView> {
5960
child: Scaffold(
6061
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
6162
appBar: AppBar(
62-
leading: AppBarBackButton(
63-
onPressed: () async {
64-
Navigator.of(context).pop();
65-
},
66-
),
67-
title: Text(
68-
"Wallet xPub",
69-
style: STextStyles.navBarTitle(context),
70-
),
71-
),
63+
leading: AppBarBackButton(
64+
onPressed: () async {
65+
Navigator.of(context).pop();
66+
},
67+
),
68+
title: Text(
69+
"Wallet xPub",
70+
style: STextStyles.navBarTitle(context),
71+
),
72+
actions: [
73+
Padding(
74+
padding: const EdgeInsets.all(10),
75+
child: AspectRatio(
76+
aspectRatio: 1,
77+
child: AppBarIconButton(
78+
color:
79+
Theme.of(context).extension<StackColors>()!.background,
80+
shadows: const [],
81+
icon: SvgPicture.asset(
82+
Assets.svg.copy,
83+
width: 24,
84+
height: 24,
85+
color: Theme.of(context)
86+
.extension<StackColors>()!
87+
.topNavIconPrimary,
88+
),
89+
onPressed: () async {
90+
await _copy();
91+
},
92+
),
93+
),
94+
),
95+
]),
7296
body: Padding(
7397
padding: const EdgeInsets.only(
7498
top: 12,

0 commit comments

Comments
 (0)