anchor.diff:    }
   
     void _handleProgressChange() {
  -    if (_tabCount == 0)
  -      return;
  -
  -    if (!_indexIsChanging && config.selection.indexIsChanging) {
  +    if (_tabCount == 0 || _selection == null)
  +      return;
  +
  +    if (!_indexIsChanging && _selection.indexIsChanging) {
         if (config.isScrollable)
  -        scrollTo(_centeredTabScrollOffset(config.selection.index), duration: _kTabBarScroll);
  +        scrollTo(_centeredTabScrollOffset(_selection.index), duration: _kTabBarScroll);
         _indicatorRect
  -        ..begin = _indicatorRect.value ?? _tabIndicatorRect(config.selection.previousIndex)
  -        ..end = _tabIndicatorRect(config.selection.index)
  +        ..begin = _indicatorRect.value ?? _tabIndicatorRect(_selection.previousIndex)
  +        ..end = _tabIndicatorRect(_selection.index)
           ..curve = Curves.ease;
         _indexIsChanging = true;
       }
       setState(() {
  -      _indicatorRect.setProgress(_performance.progress, AnimationDirection.forward);
  +      _indicatorRect.setProgress(_selection.performance.progress, AnimationDirection.forward);
       });
     }
   
  
positive.code:         style: textStyle,
          child: new _TabBarWrapper(
            children: tabs,
            selectedIndex: config.selection.index,
            indicatorColor: indicatorColor,
            indicatorRect: _indicatorRect.value,
            textAndIcons: textAndIcons,
  
negative.code:     }
  
      if (_scrollDirection == AnimationDirection.forward)
        scrollTo(performance.progress);
      else
        scrollTo(1.0 - performance.progress);
    }
  
    int get itemCount => _itemIndices.length;
  
    void dispatchOnScroll() {
      if (_selection == null || _selection.indexIsChanging)
        return;
      // This class is driving the TabBarSelection's performance.
  
      final Performance performance = _selection._performance;
  
      if (_selection.index == 0 || _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 (_selection == null || _selection.indexIsChanging)
        return new Future.value();
  
      if (scrollVelocity.dx.abs() > _kMinFlingVelocity) {
        final int selectionDelta = scrollVelocity.dx > 0 ? -1 : 1;
        _selection.index = (_selection.index + selectionDelta).clamp(0, _tabCount - 1);
        return new Future.value();
      }
  
      final int selectionIndex = _selection.index;
      final int settleIndex = snapScrollOffset(scrollOffset).toInt();
      if (selectionIndex > 0 && settleIndex != 1) {
          _selection.index += settleIndex == 2 ? 1 : -1;
          return new Future.value();
      } else if (selectionIndex == 0 && settleIndex == 1) {
        _selection.index = 1;
        return new Future.value();
      }
      return settleScrollOffset();
    }
  
    List<Widget> buildItems(BuildContext context, int start, int count) {
      TabBarSelectionState oldSelection = _selection;
      _selection = TabBarSelection.of(context);
      if (oldSelection != _selection) {
        _removeSelectionListeners(oldSelection);
        _addSelectionListeners(_selection);
        if (_selection != null)
          _initItemIndicesAndScrollPosition();
      }
  
      return _itemIndices
        .skip(start)
        .take(count)
        .map((int i) => config.itemBuilder(context, config.items[i], i))
        .toList();
    }
  }
  