Unverified Commit 9ed650ae authored by Kohei Seino's avatar Kohei Seino Committed by GitHub
parent abebd340
......@@ -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({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment