offset property
The difference between the animation's value and index. The offset value must be between -1.0 and 1.0.
This property is typically set by the TabBarView when the user drags left or right. A value between -1.0 and 0.0 implies that the TabBarView has been dragged to the left. Similarly a value between 0.0 and 1.0 implies that the TabBarView has been dragged to the right.
Implementation
double get offset => length > 1 ? _animationController.value - _index.toDouble() : 0.0;
Implementation
set offset(double value) {
assert(length > 1);
assert(value != null);
assert(value >= -1.0 && value <= 1.0);
assert(!indexIsChanging);
if (value == offset)
return;
_animationController.value = value + _index.toDouble();
}