@@ -142,6 +142,8 @@ enum MainAxisAlignment {
142142/// See also:
143143///
144144/// * [Column] , [Row] , and [Flex] , the flex widgets.
145+ /// * [Flex.crossAxisAlignment] , the property on flex widgets that
146+ /// has this type.
145147/// * [RenderFlex] , the flex render object.
146148enum CrossAxisAlignment {
147149 /// Place the children with their start edge aligned with the start side of
@@ -185,16 +187,35 @@ enum CrossAxisAlignment {
185187
186188 /// Place the children along the cross axis such that their baselines match.
187189 ///
190+ /// Consider using this value for any horizontal main axis (as with [Row] )
191+ /// where the children primarily contain text. If the different children
192+ /// have text with different font metrics (for example because they differ
193+ /// in [TextStyle.fontSize] or other [TextStyle] properties, or because
194+ /// they use different fonts due to being written in different scripts),
195+ /// then this typically produces better visual alignment than the other
196+ /// [CrossAxisAlignment] values, which use no information about
197+ /// where the text sits vertically within its bounding box.
198+ ///
199+ /// The baseline of a widget is typically the typographic baseline of the
200+ /// first text in the first [Text] or [RichText] widget it encloses, if any.
201+ /// The typographic baseline is a horizontal line used for aligning text,
202+ /// which is specified by each font; for alphabetic scripts, it ordinarily
203+ /// runs along the bottom of letters excluding any descenders.
204+ ///
188205 /// Because baselines are always horizontal, this alignment is intended for
189- /// horizontal main axes. If the main axis is vertical, then this value is
190- /// treated like [start] .
206+ /// horizontal main axes (as with [Row] ) . If the main axis is vertical
207+ /// (as with [Column] ), then this value is treated like [start] .
191208 ///
192209 /// For horizontal main axes, if the minimum height constraint passed to the
193210 /// flex layout exceeds the intrinsic height of the cross axis, children will
194211 /// be aligned as close to the top as they can be while honoring the baseline
195212 /// alignment. In other words, the extra space will be below all the children.
196213 ///
197214 /// Children who report no baseline will be top-aligned.
215+ ///
216+ /// See also:
217+ ///
218+ /// * [RenderBox.getDistanceToBaseline] , which defines the baseline of a box.
198219 baseline,
199220}
200221
0 commit comments