CW-368 Fix Range error accessing outputs (#912)
Godwin Asuquo committed
May 5, 2023 at 03:15 UTC
25b743df47d6ac6949ea0feaad6fa691796da093
1 file changed
+4
-7
lib/src/screens/send/widgets/confirm_sending_alert.dart
+4
-7
@@ -142,10 +142,8 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
142
required this.feeValue,
143
required this.feeFiatAmount,
144
required this.outputs})
145
- : itemCount = 0,
146
- recipientTitle = '' {
147
- itemCount = outputs.length;
148
- recipientTitle = itemCount > 1
145
+ : recipientTitle = '' {
146
+ recipientTitle = outputs.length > 1
147
? S.current.transaction_details_recipient_address
148
: S.current.recipient_address;
149
}
@@ -165,7 +163,6 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
163
ScrollController controller = ScrollController();
164
double fromTop = 0;
165
String recipientTitle;
168
- int itemCount;
166
bool showScrollbar = false;
167
168
@override
@@ -342,12 +339,12 @@ class ConfirmSendingAlertContentState extends State<ConfirmSendingAlertContent>
339
decoration: TextDecoration.none,
340
),
341
),
345
- itemCount > 1
342
+ outputs.length > 1
343
? ListView.builder(
344
padding: EdgeInsets.only(top: 0),
345
shrinkWrap: true,
346
physics: NeverScrollableScrollPhysics(),
350
- itemCount: itemCount,
347
+ itemCount: outputs.length,
348
itemBuilder: (context, index) {
349
final item = outputs[index];
350
final _address = item.isParsedAddress