DefaultTextStyleModifier class final

Modifier that applies default text styling to its descendants.

Wraps the child in a DefaultTextStyle widget with the specified text properties.

Inheritance
Mixed-in types

Constructors

DefaultTextStyleModifier({TextStyle? style, TextAlign? textAlign, bool? softWrap, TextOverflow? overflow, int? maxLines, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior})
const

Properties

hashCode int
Overrides the hash code getter to compute hash code based on properties.
no setterinherited
maxLines int?
final
overflow TextOverflow
final
props List<Object?>
The properties based on which equality and hash code are computed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
softWrap bool
final
stringify bool
Whether to use a detailed string representation of the object.
no setterinherited
style TextStyle
final
textAlign TextAlign?
final
textHeightBehavior TextHeightBehavior?
final
textWidthBasis TextWidthBasis
final
type Type
no setterinherited

Methods

build(Widget child) Widget
Builds the modified widget by wrapping or transforming child.
override
copyWith({TextStyle? style, TextAlign? textAlign, bool? softWrap, TextOverflow? overflow, int? maxLines, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior}) DefaultTextStyleModifier
Creates a copy of this spec with the given fields replaced by the non-null parameter values.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
getDiff(Equatable other) Map<String, String>
Returns a map of properties that differ between this object and another.
inherited
lerp(covariant DefaultTextStyleModifier? other, double t) DefaultTextStyleModifier
Linearly interpolates with another Spec object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
Overrides the equality operator to compare based on the properties.
inherited