Center all strings in SemanticDebugger (#10570)
Fixes https://github.com/flutter/flutter/issues/4647
This commit is contained in:
parent
c445c0880c
commit
96b9d6473e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user