ReactrTickerProviderStateMixin mixin
A mixin that provides a TickerProvider for multiple Tickers for Reactr controllers.
This mixin is used to provide the TickerProvider functionality needed by multiple AnimationControllers when they're being used within a ReactrController.
Example usage:
class MyController extends ReactrController with ReactrTickerProviderStateMixin {
late AnimationController animationController1;
late AnimationController animationController2;
@override
void onInit() {
super.onInit();
animationController1 = AnimationController(
vsync: this,
duration: Duration(seconds: 1),
);
animationController2 = AnimationController(
vsync: this,
duration: Duration(seconds: 2),
);
}
@override
void onClose() {
animationController1.dispose();
animationController2.dispose();
super.onClose();
}
}
- Superclass constraints
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createTicker(
TickerCallback onTick) → Ticker -
Creates a ticker with the given callback.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClose(
) → void -
override
-
onInit(
) → void -
inherited
-
onReady(
) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited