anchor.diff:        progress = 0.0;
       else if (_previousIndex == 0)
         progress = _performance.progress;
  -    else if (_previousIndex == maxIndex)
  +    else if (_previousIndex == config.maxIndex)
         progress = 1.0 - _performance.progress;
       else if (_previousIndex < _index)
         progress = (_performance.progress - 0.5) * 2.0;
  
positive.code:     }
    }
  
    BoundedBehavior _boundedBehavior;
  
    ExtentScrollBehavior get scrollBehavior {
      _boundedBehavior ??= new BoundedBehavior();
      return _boundedBehavior;
    }
  
    Performance get _performance => config.selection._performance;
  
    void initState() {
      super.initState();
      _initItemIndicesAndScrollPosition();
      _performance
        ..addListener(_handleProgressChange);
    }
  
    void dispose() {
      _performance
        ..removeListener(_handleProgressChange)
        ..stop();
      super.dispose();
    }
  
    void _handleProgressChange() {
      if (!config.selection.indexIsChanging)
        return;
      // The TabBar is driving the TabBarSelection performance.
  
      if (_performance.status == PerformanceStatus.completed) {
        _initItemIndicesAndScrollPosition();
        return;
      }
  
      if (_performance.status != PerformanceStatus.forward)
        return;
  
      final int selectedIndex = config.selection.index;
      final int previousSelectedIndex = config.selection.previousIndex;
  
      if (selectedIndex < previousSelectedIndex) {
        _itemIndices = <int>[selectedIndex, previousSelectedIndex];
  
negative.code:   ) {
      assert(items != null);
      assert(items.length > 1);
    }
  
    _TabBarViewState createState() => new _TabBarViewState<T>();
  }
  
  class _TabBarViewState<T> extends PageableListState<T, TabBarView<T>> {
  
    TabBarSelectionState _selection;
    List<int> _itemIndices = [0, 1];
    AnimationDirection _scrollDirection = AnimationDirection.forward;
  
    int get _tabCount => config.items.length;
  
    void _addSelectionListeners(TabBarSelectionState selection) {
      if (selection != null)
        selection._performance.addListener(_handleProgressChange);
    }
  
    void _removeSelectionListeners(TabBarSelectionState selection) {
      if (selection != null)
        selection._performance.removeListener(_handleProgressChange);
    }
  
    BoundedBehavior _boundedBehavior;
  
    ExtentScrollBehavior get scrollBehavior {
      _boundedBehavior ??= new BoundedBehavior();
      return _boundedBehavior;
    }
  
    void dispose() {
      _removeSelectionListeners(_selection);
      super.dispose();
    }
  
    void _initItemIndicesAndScrollPosition() {
      assert(_selection != null);
      final int selectedIndex = _selection.index;
      if (selectedIndex == 0) {
        _itemIndices = <int>[0, 1];
        scrollTo(0.0);
  