anchor.diff:      return child.parentData.flex != null ? child.parentData.flex : 0;
     }
   
  +  double _getCrossSize(RenderBox child) {
  +    return (_direction == FlexDirection.horizontal) ? child.size.height : child.size.width;
  +  }
  +
  +  double _getMainSize(RenderBox child) {
  +    return (_direction == FlexDirection.horizontal) ? child.size.width : child.size.height;
  +  }
  +
     void performLayout() {
       // Based on http://www.w3.org/TR/css-flexbox-1/ Section 9.7 Resolving Flexible Lengths
       // Steps 1-3. Determine used flex factor, size inflexible items, calculate free space
  
positive.code:     switch (_direction) {
        case FlexDirection.horizontal:
          size = constraints.constrain(new Size(mainSize, crossSize));
          break;
        case FlexDirection.vertical:
          size = constraints.constrain(new Size(crossSize, mainSize));
          break;
      }
  
      // Position elements. For now, center the flex items in the cross direction
      double mainDimPosition = leadingSpace;
      child = firstChild;
      while (child != null) {
        switch (_direction) {
          case FlexDirection.horizontal:
            child.parentData.position = new Point(mainDimPosition, size.height / 2.0 - child.size.height / 2.0);
            mainDimPosition += child.size.width;
            break;
          case FlexDirection.vertical:
            child.parentData.position = new Point(size.width / 2.0 - child.size.width / 2.0, mainDimPosition);
            mainDimPosition += child.size.height;
            break;
        }
        mainDimPosition += betweenSpace;
        child = child.parentData.nextSibling;
      }
    }
  
negative.code:             innerConstraints = new BoxConstraints(maxHeight: constraints.maxHeight,
                                                    minWidth: spaceForChild,
                                                    maxWidth: spaceForChild);
              break;
            case FlexDirection.vertical:
              innerConstraints = new BoxConstraints(minHeight: spaceForChild,
                                                    maxHeight: spaceForChild,
                                                    maxWidth: constraints.maxWidth);
              break;
          }
          child.layout(innerConstraints, parentUsesSize: true);
          usedSpace += _getMainSize(child);
          crossSize = math.max(crossSize, _getCrossSize(child));
        }
        child = child.parentData.nextSibling;
      }
  