fix marquee

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-08-04 16:11:38 +08:00
parent 6cb8a8e060
commit 8077573c50

View File

@@ -224,17 +224,25 @@ abstract class MarqueeRender extends RenderBox
if (_spacing.isNegative) _spacing *= -size.height;
}
final hasTicker = this.hasTicker;
if (_distance > 0) {
updateSize();
_ticker.initIfNeeded(_onTick);
markNeedsCompositingBitsUpdate();
if (!hasTicker) {
markNeedsCompositingBitsUpdate();
}
} else {
_ticker.cancel();
if (hasTicker) {
markNeedsCompositingBitsUpdate();
}
}
}
bool get hasTicker => _ticker._ticker != null;
@override
bool get isRepaintBoundary => _ticker._ticker != null;
bool get isRepaintBoundary => hasTicker;
void paintCenter(PaintingContext context, Offset offset) {
if (_direction == Axis.horizontal) {