forked from firka/flutter
Replace Flex to Row and Column in tests and examples.
This still leaves Flex and FlexDirection available. At some point once people have transitioned to Row/Column we should rename Flex to _Flex and stop reexporting FlexDirection from basic.dart.
This commit is contained in:
@@ -105,6 +105,6 @@ class EditableText extends StatefulComponent {
|
||||
child: new CustomPaint(callback: _paintCursor, token: _showCursor)
|
||||
);
|
||||
|
||||
return new Flex([text, cursor]);
|
||||
return new Row([text, cursor]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,7 +387,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
||||
crossSize = math.max(crossSize, _getCrossSize(child));
|
||||
}
|
||||
if (alignItems == FlexAlignItems.baseline) {
|
||||
assert(textBaseline != null);
|
||||
assert(textBaseline != null && 'To use FlexAlignItems.baseline, you must also specify which baseline to use using the "baseline" argument.' is String);
|
||||
double distance = child.getDistanceToBaseline(textBaseline, onlyReal: true);
|
||||
if (distance != null)
|
||||
maxBaselineDistance = math.max(maxBaselineDistance, distance);
|
||||
|
||||
@@ -28,7 +28,7 @@ export 'package:sky/base/hit_test.dart' show EventDisposition, combineEventDispo
|
||||
export 'package:sky/painting/text_style.dart';
|
||||
export 'package:sky/rendering/block.dart' show BlockDirection;
|
||||
export 'package:sky/rendering/box.dart' show BoxConstraints;
|
||||
export 'package:sky/rendering/flex.dart' show FlexDirection, FlexJustifyContent, FlexAlignItems;
|
||||
export 'package:sky/rendering/flex.dart' show FlexJustifyContent, FlexAlignItems, FlexDirection;
|
||||
export 'package:sky/rendering/object.dart' show Point, Offset, Size, Rect, Color, Paint, Path;
|
||||
export 'package:sky/rendering/proxy_box.dart' show BackgroundImage, BoxDecoration, BoxDecorationPosition, BoxShadow, Border, BorderSide, EdgeDims, Shape;
|
||||
export 'package:sky/rendering/toggleable.dart' show ValueChanged;
|
||||
@@ -494,7 +494,7 @@ class Row extends Flex {
|
||||
justifyContent: FlexJustifyContent.start,
|
||||
alignItems: FlexAlignItems.center,
|
||||
textBaseline
|
||||
}) : super(children, key: key, direction: FlexDirection.horizontal, justifyContent: justifyContent, alignItems: alignItems);
|
||||
}) : super(children, key: key, direction: FlexDirection.horizontal, justifyContent: justifyContent, alignItems: alignItems, textBaseline: textBaseline);
|
||||
}
|
||||
|
||||
class Column extends Flex {
|
||||
@@ -503,7 +503,7 @@ class Column extends Flex {
|
||||
justifyContent: FlexJustifyContent.start,
|
||||
alignItems: FlexAlignItems.center,
|
||||
textBaseline
|
||||
}) : super(children, key: key, direction: FlexDirection.vertical, justifyContent: justifyContent, alignItems: alignItems);
|
||||
}) : super(children, key: key, direction: FlexDirection.vertical, justifyContent: justifyContent, alignItems: alignItems, textBaseline: textBaseline);
|
||||
}
|
||||
|
||||
class Flexible extends ParentDataNode {
|
||||
|
||||
@@ -16,7 +16,6 @@ import 'package:sky/rendering/view.dart';
|
||||
|
||||
export 'package:sky/base/hit_test.dart' show EventDisposition, combineEventDispositions;
|
||||
export 'package:sky/rendering/box.dart' show BoxConstraints, BoxDecoration, Border, BorderSide, EdgeDims;
|
||||
export 'package:sky/rendering/flex.dart' show FlexDirection;
|
||||
export 'package:sky/rendering/object.dart' show Point, Offset, Size, Rect, Color, Paint, Path;
|
||||
|
||||
final bool _shouldLogRenderDuration = false; // see also 'enableProfilingLoop' argument to runApp()
|
||||
|
||||
Reference in New Issue
Block a user