Commit 96b9d647 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Center all strings in SemanticDebugger (#10570)

Fixes https://github.com/flutter/flutter/issues/4647
parent c445c088
......@@ -252,6 +252,7 @@ void _paintMessage(Canvas canvas, SemanticsNode node) {
canvas.clipRect(rect);
final TextPainter textPainter = new TextPainter()
..text = new TextSpan(style: _messageStyle, text: message)
..textAlign = TextAlign.center
..layout(maxWidth: rect.width);
textPainter.paint(canvas, FractionalOffset.center.inscribe(textPainter.size, rect).topLeft);
......
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