Fixes crash in Flutter Sprites label (#3942)
This commit is contained in:
parent
7d2519f073
commit
e1e773af4f
@ -37,6 +37,7 @@ class Label extends Node {
|
|||||||
if (_painter == null) {
|
if (_painter == null) {
|
||||||
_painter = new TextPainter(text: new TextSpan(style: _textStyle, text: _text))
|
_painter = new TextPainter(text: new TextSpan(style: _textStyle, text: _text))
|
||||||
..layout();
|
..layout();
|
||||||
|
_width = _painter.size.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
Offset offset = Offset.zero;
|
Offset offset = Offset.zero;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user