Remove redundant 'flex' prefixes on enum values.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1232063004 .
This commit is contained in:
Hixie 2015-07-10 13:57:46 -07:00
parent b4aa27685c
commit e672c1ddd0
6 changed files with 15 additions and 15 deletions

View File

@ -32,8 +32,8 @@ void main() {
row.parentData.flex = 1;
}
addRow(FlexJustifyContent.flexStart);
addRow(FlexJustifyContent.flexEnd);
addRow(FlexJustifyContent.start);
addRow(FlexJustifyContent.end);
addRow(FlexJustifyContent.center);
addRow(FlexJustifyContent.spaceBetween);
addRow(FlexJustifyContent.spaceAround);

View File

@ -96,7 +96,7 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
child: new Flex(children,
direction: FlexDirection.vertical,
justifyContent: FlexJustifyContent.center,
alignItems: FlexAlignItems.flexStart
alignItems: FlexAlignItems.start
)
);

View File

@ -22,16 +22,16 @@ class FlexBoxParentData extends BoxParentData with ContainerParentDataMixin<Rend
enum FlexDirection { horizontal, vertical }
enum FlexJustifyContent {
flexStart,
flexEnd,
start,
end,
center,
spaceBetween,
spaceAround,
}
enum FlexAlignItems {
flexStart,
flexEnd,
start,
end,
center,
}
@ -43,7 +43,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
RenderFlex({
FlexDirection direction: FlexDirection.horizontal,
FlexJustifyContent justifyContent: FlexJustifyContent.flexStart,
FlexJustifyContent justifyContent: FlexJustifyContent.start,
FlexAlignItems alignItems: FlexAlignItems.center
}) : _direction = direction, _justifyContent = justifyContent, _alignItems = alignItems;
@ -326,11 +326,11 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
double betweenSpace;
child = firstChild;
switch (_justifyContent) {
case FlexJustifyContent.flexStart:
case FlexJustifyContent.start:
leadingSpace = 0.0;
betweenSpace = 0.0;
break;
case FlexJustifyContent.flexEnd:
case FlexJustifyContent.end:
leadingSpace = remainingSpace;
betweenSpace = 0.0;
break;
@ -366,10 +366,10 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
assert(child.parentData is FlexBoxParentData);
double childCrossPosition;
switch (_alignItems) {
case FlexAlignItems.flexStart:
case FlexAlignItems.start:
childCrossPosition = 0.0;
break;
case FlexAlignItems.flexEnd:
case FlexAlignItems.end:
childCrossPosition = crossSize - _getCrossSize(child);
break;
case FlexAlignItems.center:

View File

@ -402,7 +402,7 @@ class Flex extends MultiChildRenderObjectWrapper {
Flex(List<Widget> children, {
String key,
this.direction: FlexDirection.horizontal,
this.justifyContent: FlexJustifyContent.flexStart,
this.justifyContent: FlexJustifyContent.start,
this.alignItems: FlexAlignItems.center
}) : super(key: key, children: children);

View File

@ -72,7 +72,7 @@ class Dialog extends Component {
}
if (actions != null)
children.add(new Flex(actions, justifyContent: FlexJustifyContent.flexEnd));
children.add(new Flex(actions, justifyContent: FlexJustifyContent.end));
return new Stack([
new Listener(

View File

@ -67,7 +67,7 @@ class ToolBar extends Component {
data: new IconThemeData(color: iconThemeColor),
child: new Flex(
[new Container(child: new Flex(children), height: kToolBarHeight)],
alignItems: FlexAlignItems.flexEnd
alignItems: FlexAlignItems.end
)
),
padding: new EdgeDims.symmetric(horizontal: 8.0),