updateMultiple method
void
updateMultiple({})
Batch update method for multiple state changes
Implementation
void updateMultiple({
bool? animationEnd,
bool? animationComplete,
bool? isAnimationReady,
bool? isSwipeInProgress,
bool? isSwipingLeft,
int? currentPage,
int? currentPageComplete,
}) {
bool shouldNotify = false;
if (animationEnd != null && _animationEnd != animationEnd) {
_animationEnd = animationEnd;
shouldNotify = true;
}
if (animationComplete != null && _animationComplete != animationComplete) {
_animationComplete = animationComplete;
shouldNotify = true;
}
if (isAnimationReady != null && _isAnimationReady != isAnimationReady) {
_isAnimationReady = isAnimationReady;
shouldNotify = true;
}
if (isSwipeInProgress != null && _isSwipeInProgress != isSwipeInProgress) {
_isSwipeInProgress = isSwipeInProgress;
shouldNotify = true;
}
if (isSwipingLeft != null && _isSwipingLeft != isSwipingLeft) {
_isSwipingLeft = isSwipingLeft;
shouldNotify = true;
}
if (currentPage != null && _currentPage != currentPage) {
_currentPage = currentPage;
shouldNotify = true;
}
if (currentPageComplete != null &&
_currentPageComplete != currentPageComplete) {
_currentPageComplete = currentPageComplete;
shouldNotify = true;
}
if (shouldNotify) {
notifyListeners();
}
}