mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
Merge branch 'dev' into cw-1440-new-buy-sell-flow
# Conflicts: # lib/src/widgets/cake_image_widget.dart
This commit is contained in:
@@ -80,13 +80,26 @@ class AddressFormatter {
|
||||
spans.add(TextSpan(text: '${chunks[i]} ', style: style));
|
||||
}
|
||||
|
||||
return RichText(
|
||||
text: TextSpan(children: spans),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
overflow: TextOverflow.visible,
|
||||
return _withAddressSemantics(
|
||||
address: address,
|
||||
child: RichText(
|
||||
text: TextSpan(children: spans),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// The visual segmentation turns an address into space-separated pseudo-words
|
||||
/// (and, when truncated, into a literal "..."), which cannot be used to verify
|
||||
/// an address by ear. Announce the full address instead, exactly the way
|
||||
/// `Text.semanticsLabel` does.
|
||||
static Widget _withAddressSemantics({required String address, required Widget child}) =>
|
||||
Semantics(
|
||||
label: address,
|
||||
child: ExcludeSemantics(child: child),
|
||||
);
|
||||
|
||||
static Widget _buildTruncatedAddress({
|
||||
required String address,
|
||||
required bool isMWEB,
|
||||
@@ -112,10 +125,13 @@ class AddressFormatter {
|
||||
TextSpan(text: lastChunk, style: evenTextStyle),
|
||||
];
|
||||
|
||||
return RichText(
|
||||
text: TextSpan(children: spans),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
overflow: TextOverflow.visible,
|
||||
return _withAddressSemantics(
|
||||
address: address,
|
||||
child: RichText(
|
||||
text: TextSpan(children: spans),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
final int digitCount = chunkSize;
|
||||
@@ -142,10 +158,13 @@ class AddressFormatter {
|
||||
TextSpan(text: lastPart, style: evenTextStyle),
|
||||
];
|
||||
|
||||
return RichText(
|
||||
text: TextSpan(children: spans),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
overflow: TextOverflow.visible,
|
||||
return _withAddressSemantics(
|
||||
address: address,
|
||||
child: RichText(
|
||||
text: TextSpan(children: spans),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
overflow: TextOverflow.visible,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user