tickerSignal function

TickerSignal tickerSignal({
  1. Duration? initialDuration,
  2. String? debugLabel,
})

Ticker signal used to drive animations and can create animation controllers

void main() {
  final ticker = tickerSignal(); // could be a global
  final controller = ticker.toAnimationController(); // can be local or global
  final curve = CurvedAnimation(parent: controller, curve: Curves.easeOut); // can be used outside of widget tree
  final alpha = IntTween(begin: 0, end: 255).animate(curve);
  ...
  final alphaSignal = alpha.toSignal(); // can be converted to a signal
}

Implementation

TickerSignal tickerSignal({
  Duration? initialDuration,
  String? debugLabel,
}) {
  return TickerSignal(
    initialDuration: initialDuration,
    debugLabel: debugLabel,
  );
}