anchor.diff:      if (_indexIsChanging && status == PerformanceStatus.completed) {
         _indexIsChanging = false;
         double progress = 0.5;
  -      if (config.selection.index == 0)
  +      if (_selection.index == 0)
           progress = 0.0;
  -      else if (config.selection.index == _tabCount - 1)
  +      else if (_selection.index == _tabCount - 1)
           progress = 1.0;
         setState(() {
           _indicatorRect
  -          ..begin = _tabIndicatorRect(math.max(0, config.selection.index - 1))
  -          ..end = _tabIndicatorRect(math.min(_tabCount - 1, config.selection.index + 1))
  +          ..begin = _tabIndicatorRect(math.max(0, _selection.index - 1))
  +          ..end = _tabIndicatorRect(math.min(_tabCount - 1, _selection.index + 1))
             ..curve = null
             ..setProgress(progress, AnimationDirection.forward);
         });
  
positive.code:     }
  
      if (_scrollDirection == AnimationDirection.forward)
        scrollTo(_performance.progress);
      else
        scrollTo(1.0 - _performance.progress);
    }
  
    int get itemCount => _itemIndices.length;
  
    List<Widget> buildItems(BuildContext context, int start, int count) {
      return _itemIndices
        .skip(start)
        .take(count)
        .map((int i) => config.itemBuilder(context, config.items[i], i))
        .toList();
    }
  
    void dispatchOnScroll() {
      if (config.selection.indexIsChanging)
        return;
      // This class is driving the TabBarSelection's performance.
  
      if (config.selection.index == 0 || config.selection.index == _tabCount - 1)
        _performance.progress = scrollOffset;
      else
        _performance.progress = scrollOffset / 2.0;
    }
  
    Future fling(Offset scrollVelocity) {
      // TODO(hansmuller): should not short-circuit in this case.
      if (config.selection.indexIsChanging)
        return new Future.value();
  
      if (scrollVelocity.dx.abs() > _kMinFlingVelocity) {
        final int selectionDelta = scrollVelocity.dx > 0 ? -1 : 1;
        config.selection.index = (config.selection.index + selectionDelta).clamp(0, _tabCount - 1);
        return new Future.value();
      }
  
      final int selectionIndex = config.selection.index;
      final int settleIndex = snapScrollOffset(scrollOffset).toInt();
      if (selectionIndex > 0 && settleIndex != 1) {
          config.selection.index += settleIndex == 2 ? 1 : -1;
          return new Future.value();
      } else if (selectionIndex == 0 && settleIndex == 1) {
        config.selection.index = 1;
        return new Future.value();
      }
      return settleScrollOffset();
    }
  
  }
  
negative.code:     _viewportSize = newSize;
      _updateScrollBehavior();
      if (config.isScrollable)
        scrollTo(_centeredTabScrollOffset(_selection.index), duration: _kTabBarScroll);
    }
  
    Widget buildContent(BuildContext context) {
      TabBarSelectionState oldSelection = _selection;
      _selection = TabBarSelection.of(context);
      if (oldSelection != _selection) {
        _removeSelectionListeners(oldSelection);
        _addSelectionListeners(_selection);
      }
  
      assert(config.labels != null && config.labels.isNotEmpty);
      assert(Material.of(context) != null);
  
  