SlideRevealController constructor
SlideRevealController({
- required TickerProvider vsync,
- Duration duration = const Duration(milliseconds: 300),
Creates a SlideRevealController with the provided vsync
(a TickerProvider)
and an optional animation duration
.
Implementation
SlideRevealController({
required TickerProvider vsync,
Duration duration = const Duration(milliseconds: 300),
}) : _animationController = AnimationController(
vsync: vsync,
lowerBound: 0,
upperBound: 1,
duration: duration,
) {
/// Listen to the animation status to reset the side to null when the animation is dismissed.
_animationController.addStatusListener((status) {
if (status == AnimationStatus.dismissed && _side != null) {
_side = null;
notifyListeners();
}
});
}