-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathaddress_checkphrase_with_initial.dart
More file actions
55 lines (50 loc) · 1.88 KB
/
Copy pathaddress_checkphrase_with_initial.dart
File metadata and controls
55 lines (50 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import 'package:flutter/widgets.dart';
import 'package:quantus_sdk/quantus_sdk.dart';
import 'package:resonance_network_wallet/shared/utils/account_utils.dart';
import 'package:resonance_network_wallet/v2/theme/app_colors.dart';
import 'package:resonance_network_wallet/v2/theme/app_text_styles.dart';
class AddressCheckphraseWithInitial extends StatelessWidget {
final String recipientChecksum;
final String recipientAddress;
const AddressCheckphraseWithInitial({super.key, required this.recipientChecksum, required this.recipientAddress});
@override
Widget build(BuildContext context) {
final colors = context.colors;
final text = context.themeText;
final avatarSize = 40.0;
return Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: avatarSize,
height: avatarSize,
alignment: Alignment.center,
decoration: BoxDecoration(color: colors.sheetBackground, borderRadius: BorderRadius.circular(20)),
child: Text(
getAccountBadgeInitials(recipientChecksum, separator: '-'),
style: text.transactionDetailRowValue?.copyWith(color: colors.textLabel),
),
),
const SizedBox(width: 14),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
recipientChecksum,
style: text.smallParagraph?.copyWith(color: colors.checksum, height: 1.35),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
const SizedBox(height: 4),
Text(
AddressFormattingService.formatAddress(recipientAddress.trim()),
style: text.transactionDetailRowValue?.copyWith(fontSize: 14),
),
],
),
),
],
);
}
}