Unverified Commit 3ce06efd authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Default textBaseline to alphabetic in Flex (#61425)

parent f25bd9c5
......@@ -3871,7 +3871,7 @@ class Flex extends MultiChildRenderObjectWidget {
this.crossAxisAlignment = CrossAxisAlignment.center,
this.textDirection,
this.verticalDirection = VerticalDirection.down,
this.textBaseline,
this.textBaseline = TextBaseline.alphabetic,
this.clipBehavior = Clip.hardEdge,
List<Widget> children = const <Widget>[],
}) : assert(direction != null),
......@@ -3963,6 +3963,8 @@ class Flex extends MultiChildRenderObjectWidget {
final VerticalDirection verticalDirection;
/// If aligning items according to their baseline, which baseline to use.
///
/// Defaults to [TextBaseline.alphabetic].
final TextBaseline textBaseline;
// TODO(liyuqian): defaults to [Clip.none] once Google references are updated.
......@@ -4219,7 +4221,7 @@ class Row extends Flex {
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
TextDirection textDirection,
VerticalDirection verticalDirection = VerticalDirection.down,
TextBaseline textBaseline,
TextBaseline textBaseline = TextBaseline.alphabetic,
List<Widget> children = const <Widget>[],
}) : super(
children: children,
......
......@@ -34,8 +34,8 @@ void main() {
' If multiple keyed nodes exist as children of another node, they\n'
' must have unique keys.\n'
' Flex(direction: vertical, mainAxisAlignment: start,\n'
' crossAxisAlignment: center) has multiple children with key\n'
" [<'key'>].\n",
' crossAxisAlignment: center, textBaseline: alphabetic) has\n'
" multiple children with key [<'key'>].\n",
),
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment