Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-11-22 19:35:42 +08:00
parent cb8333d4c0
commit c4aca389a8
8 changed files with 23 additions and 18 deletions

View File

@@ -399,12 +399,12 @@ class _MarqueeSimulation extends Simulation {
class ContextSingleTicker implements TickerProvider {
Ticker? _ticker;
BuildContext context;
final bool autoStart;
final bool Function()? autoStart;
ContextSingleTicker(this.context, {this.autoStart = true});
ContextSingleTicker(this.context, {this.autoStart});
void initStart() {
if (autoStart) {
if (autoStart?.call() ?? true) {
_ticker?.start();
}
}