TickerSignal#
Kind:
class & function |
Package: package:signals_flutter
Class: TickerSignal#
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
}
Members of TickerSignal#
| Member | Type | Signature | Description |
|---|---|---|---|
| TickerSignal | constructor |
dart TickerSignal({Duration? initialDuration, super.options, @Deprecated('Use options: SignalOptions(name: ...) instead') super.debugLabel})
|
Ticker signal used to drive animations and can create animation controllers |
| createTicker | method |
dart Ticker createTicker(TickerCallback onTick) |
|
| dispose | method |
dart void dispose() |
|
| toAnimationController | method |
dart AnimationController toAnimationController({double? value, Duration? duration, Duration? reverseDuration, String? debugLabel, double lowerBound = 0.0, double upperBound = 1.0, AnimationBehavior animationBehavior = AnimationBehavior.normal})
|
Create a new AnimationController |
Function: tickerSignal#
TickerSignal tickerSignal({Duration? initialDuration, SignalOptions<Duration>? options, @Deprecated('Use options: SignalOptions(name: ...) instead') 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
}
References#
The TickerSignal type is referenced and used in the following pages:
- Ticker Signal (signals_flutter/signals)
- TickerSignal (signals/signals)
- signals