mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
Null TextWidthBasis docs (#39761)
Docs improvement after seeing "null" showing up for TextWidthBasis.
This commit is contained in:
parent
2640bfeb10
commit
64424a6ae4
|
@ -374,7 +374,7 @@ class SelectableText extends StatefulWidget {
|
|||
/// {@macro flutter.widgets.edtiableText.scrollPhysics}
|
||||
final ScrollPhysics scrollPhysics;
|
||||
|
||||
/// {@macro flutter.dart:ui.text.TextWidthBasis}
|
||||
/// {@macro flutter.painting.textPainter.textWidthBasis}
|
||||
final TextWidthBasis textWidthBasis;
|
||||
|
||||
@override
|
||||
|
|
|
@ -79,9 +79,9 @@ class PlaceholderDimensions {
|
|||
}
|
||||
}
|
||||
|
||||
/// The different ways of considering the width of one or more lines of text.
|
||||
/// The different ways of measuring the width of one or more lines of text.
|
||||
///
|
||||
/// See [Text.widthType].
|
||||
/// See [Text.textWidthBasis], for example.
|
||||
enum TextWidthBasis {
|
||||
/// Multiline text will take up the full width given by the parent. For single
|
||||
/// line text, only the minimum amount of width needed to contain the text
|
||||
|
@ -323,7 +323,9 @@ class TextPainter {
|
|||
_needsLayout = true;
|
||||
}
|
||||
|
||||
/// {@macro flutter.dart:ui.text.TextWidthBasis}
|
||||
/// {@template flutter.painting.textPainter.textWidthBasis}
|
||||
/// Defines how to measure the width of the rendered text.
|
||||
/// {@endtemplate}
|
||||
TextWidthBasis get textWidthBasis => _textWidthBasis;
|
||||
TextWidthBasis _textWidthBasis;
|
||||
set textWidthBasis(TextWidthBasis value) {
|
||||
|
|
|
@ -135,6 +135,7 @@ class DefaultTextStyle extends InheritedTheme {
|
|||
final int maxLines;
|
||||
|
||||
/// The strategy to use when calculating the width of the Text.
|
||||
///
|
||||
/// See [TextWidthBasis] for possible values and their implications.
|
||||
final TextWidthBasis textWidthBasis;
|
||||
|
||||
|
@ -410,7 +411,7 @@ class Text extends StatelessWidget {
|
|||
/// ```
|
||||
final String semanticsLabel;
|
||||
|
||||
/// {@macro flutter.dart:ui.text.TextWidthBasis}
|
||||
/// {@macro flutter.painting.textPainter.textWidthBasis}
|
||||
final TextWidthBasis textWidthBasis;
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue