Default textBaseline to alphabetic in Flex (#61425)
This commit is contained in:
parent
f25bd9c55c
commit
3ce06efd40
@ -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",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user