Unverified Commit f1a23574 authored by Broccolism's avatar Broccolism Committed by GitHub

feat: Text constructor, overflow, and softWrap docs (#64175)

parent f690577f
......@@ -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,
......
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