mirror of
https://github.com/flutter/flutter
synced 2024-08-24 18:36:03 +00:00
use PDI to end the isolated scope for RLI (#141345)
will fix https://github.com/flutter/flutter/issues/141344 https://unicode.org/reports/tr9/#Explicit_Directional_Isolates https://api.flutter.dev/flutter/foundation/Unicode/RLI-constant.html
This commit is contained in:
parent
abebd340d7
commit
9ed650aee5
|
@ -318,7 +318,7 @@ class _SemanticsDebuggerPainter extends CustomPainter {
|
|||
} else {
|
||||
switch (data.textDirection!) {
|
||||
case TextDirection.rtl:
|
||||
effectivelabel = '${Unicode.RLI}$tooltipAndLabel${Unicode.PDF}';
|
||||
effectivelabel = '${Unicode.RLI}$tooltipAndLabel${Unicode.PDI}';
|
||||
case TextDirection.ltr:
|
||||
effectivelabel = tooltipAndLabel;
|
||||
}
|
||||
|
|
|
@ -524,6 +524,27 @@ void main() {
|
|||
// ignore: avoid_dynamic_calls
|
||||
expect(_getSemanticsDebuggerPainter(debuggerKey: debugger, tester: tester).labelStyle, labelStyle);
|
||||
});
|
||||
|
||||
testWidgets('SemanticsDebugger label for rtl.', (WidgetTester tester) async {
|
||||
final UniqueKey debugger = UniqueKey();
|
||||
final Key label = UniqueKey();
|
||||
|
||||
await tester.pumpWidget(
|
||||
Directionality(
|
||||
textDirection: TextDirection.rtl,
|
||||
child: SemanticsDebugger(
|
||||
key: debugger,
|
||||
child: Semantics(
|
||||
label: 'ملصق',
|
||||
textDirection: TextDirection.rtl,
|
||||
key: label,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(_getMessageShownInSemanticsDebugger(widgetKey: label, debuggerKey: debugger, tester: tester), '\u2067ملصق\u2069');
|
||||
});
|
||||
}
|
||||
|
||||
String _getMessageShownInSemanticsDebugger({
|
||||
|
|
Loading…
Reference in a new issue