AppText class

A rich text widget with Google Fonts, shadows, and selectable support.

The AppText widget simplifies custom text styling and allows optional selection, font customization, and shadow effects.

Inheritance

Constructors

AppText({Key? key, required String text, double? fontSize, Color? color, FontWeight? fontWeight, FontStyle? fontStyle, TextAlign? textAlign, int? maxLines, TextOverflow? overflow, double? letterSpacing, double? wordSpacing, double? height, TextDecoration? decoration, Color? decorationColor, TextDecorationStyle? decorationStyle, TextBaseline? textBaseline, Locale? locale, StrutStyle? strutStyle, TextDirection? textDirection, bool? softWrap, TextWidthBasis? textWidthBasis, List<Shadow>? shadows, String? fontFamily, TextStyle? style, TextHeightBehavior? textHeightBehavior, bool selectable = false})
Creates a new AppText.
const

Properties

color Color?
Text color.
final
decoration TextDecoration?
Text decoration (underline, strike-through, etc.).
final
decorationColor Color?
Color of the text decoration.
final
decorationStyle TextDecorationStyle?
Style of the text decoration.
final
fontFamily String?
Custom font family (uses Google Fonts if available).
final
fontSize double?
Text size.
final
fontStyle FontStyle?
Font style.
final
fontWeight FontWeight?
Font weight.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Line height.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
letterSpacing double?
Letter spacing.
final
locale Locale?
Locale for text rendering.
final
maxLines int?
Maximum number of lines.
final
overflow TextOverflow?
Overflow handling mode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectable bool
Whether text can be selected.
final
shadows List<Shadow>?
Shadow effects.
final
softWrap bool?
Soft wrap toggle.
final
strutStyle StrutStyle?
Strut style.
final
style TextStyle?
Additional style overrides.
final
text String
The displayed text.
final
textAlign TextAlign?
Text alignment.
final
textBaseline TextBaseline?
Text baseline.
final
textDirection TextDirection?
Text direction.
final
textHeightBehavior TextHeightBehavior?
Height behavior configuration.
final
textWidthBasis TextWidthBasis?
Text width basis.
final
wordSpacing double?
Word spacing.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
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
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited