The text style to apply to descendant Text widgets without explicit style.

Inheritance

Static Methods

of(BuildContext context) DefaultTextStyle

The closest instance of this class that encloses the given context.

Constructors

DefaultTextStyle({Key key, @required TextStyle style, TextAlign textAlign, bool softWrap: true, TextOverflow overflow: TextOverflow.clip, Widget child })

Creates a default text style for the given subtree.

DefaultTextStyle.fallback()

A const-constructible default text style that provides fallback values.

const
DefaultTextStyle.merge({Key key, @required BuildContext context, TextStyle style, TextAlign textAlign, bool softWrap, TextOverflow overflow, Widget child })

Creates a default text style that inherits from the given BuildContext.

factory

Properties

overflow TextOverflow

How visual overflow should be handled.

read-only
softWrap bool

Whether the text should break at soft line breaks.

read-only
style TextStyle

The text style to apply.

read-only
textAlign TextAlign

How the text should be aligned horizontally.

read-only
child Widget

The widget below this widget in the tree.

read-only, inherited
hashCode int

Get a hash code for this object.

read-only, inherited
key Key

Controls how one widget replaces another widget in the tree.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

updateShouldNotify(DefaultTextStyle old) bool

Whether the framework should notify widgets that inherit from this widget.

createElement() InheritedElement

Inflates this configuration to a concrete instance.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited
toStringShort() String

A short, textual description of this widget.

inherited