Unverified Commit 64424a6a authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

Null TextWidthBasis docs (#39761)

Docs improvement after seeing "null" showing up for TextWidthBasis.
parent 2640bfeb
...@@ -374,7 +374,7 @@ class SelectableText extends StatefulWidget { ...@@ -374,7 +374,7 @@ class SelectableText extends StatefulWidget {
/// {@macro flutter.widgets.edtiableText.scrollPhysics} /// {@macro flutter.widgets.edtiableText.scrollPhysics}
final ScrollPhysics scrollPhysics; final ScrollPhysics scrollPhysics;
/// {@macro flutter.dart:ui.text.TextWidthBasis} /// {@macro flutter.painting.textPainter.textWidthBasis}
final TextWidthBasis textWidthBasis; final TextWidthBasis textWidthBasis;
@override @override
......
...@@ -79,9 +79,9 @@ class PlaceholderDimensions { ...@@ -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 { enum TextWidthBasis {
/// Multiline text will take up the full width given by the parent. For single /// 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 /// line text, only the minimum amount of width needed to contain the text
...@@ -323,7 +323,9 @@ class TextPainter { ...@@ -323,7 +323,9 @@ class TextPainter {
_needsLayout = true; _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 get textWidthBasis => _textWidthBasis;
TextWidthBasis _textWidthBasis; TextWidthBasis _textWidthBasis;
set textWidthBasis(TextWidthBasis value) { set textWidthBasis(TextWidthBasis value) {
......
...@@ -135,6 +135,7 @@ class DefaultTextStyle extends InheritedTheme { ...@@ -135,6 +135,7 @@ class DefaultTextStyle extends InheritedTheme {
final int maxLines; final int maxLines;
/// The strategy to use when calculating the width of the Text. /// The strategy to use when calculating the width of the Text.
///
/// See [TextWidthBasis] for possible values and their implications. /// See [TextWidthBasis] for possible values and their implications.
final TextWidthBasis textWidthBasis; final TextWidthBasis textWidthBasis;
...@@ -410,7 +411,7 @@ class Text extends StatelessWidget { ...@@ -410,7 +411,7 @@ class Text extends StatelessWidget {
/// ``` /// ```
final String semanticsLabel; final String semanticsLabel;
/// {@macro flutter.dart:ui.text.TextWidthBasis} /// {@macro flutter.painting.textPainter.textWidthBasis}
final TextWidthBasis textWidthBasis; final TextWidthBasis textWidthBasis;
@override @override
......
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