feat: Text constructor, overflow, and softWrap docs (#64175)
This commit is contained in:
@@ -126,9 +126,15 @@ class DefaultTextStyle extends InheritedTheme {
|
||||
/// Whether the text should break at soft line breaks.
|
||||
///
|
||||
/// If false, the glyphs in the text will be positioned as if there was unlimited horizontal space.
|
||||
///
|
||||
/// This also decides the [overflow] property's behavior. If this is true or null,
|
||||
/// the glyph causing overflow, and those that follow, will not be rendered.
|
||||
final bool softWrap;
|
||||
|
||||
/// How visual overflow should be handled.
|
||||
///
|
||||
/// If [softWrap] is true or null, the glyph causing overflow, and those that follow,
|
||||
/// will not be rendered. Otherwise, it will be shown with the given overflow option.
|
||||
final TextOverflow overflow;
|
||||
|
||||
/// An optional maximum number of lines for the text to span, wrapping if necessary.
|
||||
@@ -341,6 +347,10 @@ class Text extends StatelessWidget {
|
||||
/// closest enclosing [DefaultTextStyle].
|
||||
///
|
||||
/// The [data] parameter must not be null.
|
||||
///
|
||||
/// The [overflow] property's behavior is affected by the [softWrap] argument.
|
||||
/// If the [softWrap] is true or null, the glyph causing overflow, and those that follow,
|
||||
/// will not be rendered. Otherwise, it will be shown with the given overflow option.
|
||||
const Text(
|
||||
this.data, {
|
||||
Key key,
|
||||
|
||||
Reference in New Issue
Block a user