@@ -7,9 +7,12 @@ import 'package:cake_wallet/src/screens/base_page.dart';
7
7
import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart' ;
8
8
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart' ;
9
9
import 'package:cake_wallet/src/widgets/primary_button.dart' ;
10
+ import 'package:cake_wallet/utils/clipboard_util.dart' ;
11
+ import 'package:cake_wallet/utils/feature_flag.dart' ;
10
12
import 'package:cake_wallet/utils/show_pop_up.dart' ;
11
13
import 'package:cake_wallet/view_model/animated_ur_model.dart' ;
12
14
import 'package:flutter/material.dart' ;
15
+ import 'package:flutter/services.dart' ;
13
16
14
17
// ur:xmr-txunsigned - unsigned transaction
15
18
// should show a scanner afterwards.
@@ -46,8 +49,8 @@ class AnimatedURPage extends BasePage {
46
49
frames: urQr.trim ().split ("\n " ),
47
50
),
48
51
),
52
+ if (urQrType == "ur:xmr-txunsigned" || urQrType == "ur:xmr-output" ) ...{
49
53
SizedBox (height: 32 ),
50
- if (urQrType == "ur:xmr-txunsigned" || urQrType == "ur:xmr-output" )
51
54
Padding (
52
55
padding: const EdgeInsets .symmetric (horizontal: 16.0 ),
53
56
child: SizedBox (
@@ -60,8 +63,10 @@ class AnimatedURPage extends BasePage {
60
63
),
61
64
),
62
65
),
63
- SizedBox (height: 32 ),
64
- if (urQrType == "ur:xmr-output" && ! isAll) Padding (
66
+ },
67
+ if (urQrType == "ur:xmr-output" && ! isAll) ...{
68
+ SizedBox (height: 32 ),
69
+ Padding (
65
70
padding: const EdgeInsets .symmetric (horizontal: 16.0 ),
66
71
child: SizedBox (
67
72
width: double .maxFinite,
@@ -73,6 +78,7 @@ class AnimatedURPage extends BasePage {
73
78
),
74
79
),
75
80
),
81
+ },
76
82
],
77
83
);
78
84
}
@@ -168,10 +174,21 @@ class _URQRState extends State<URQR> {
168
174
children: [
169
175
Center (
170
176
child: QrImage (
171
- data: widget.frames[frame % widget.frames.length], version: - 1 ,
177
+ data: widget.frames[frame % widget.frames.length],
178
+ version: - 1 ,
172
179
size: 400 ,
173
180
),
174
181
),
182
+ if (FeatureFlag .hasDevOptions) ...{
183
+ TextButton (
184
+ onPressed: () {
185
+ Clipboard .setData (ClipboardData (text: """Current frame (${frame % widget .frames .length }): ${widget .frames [frame % widget .frames .length ]},
186
+ All frames:
187
+ - ${widget .frames .join ("\n - " )}""" ));
188
+ },
189
+ child: Text (widget.frames[frame % widget.frames.length]),
190
+ ),
191
+ }
175
192
],
176
193
);
177
194
}
0 commit comments