FlyText class

A builder-style widget that mimics Tailwind-like utilities for text

Inheritance
Mixed-in types

Constructors

FlyText(String data, {Key? key, TextStyle? style, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, TextScaler? textScaler, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, FlyStyle flyStyle = const FlyStyle()})

Properties

copyWith FlyText Function(FlyStyle newStyle)
no setteroverride
data String
final
flyStyle FlyStyle
no setteroverride
hasFlexProperties bool
Check if any flex properties are set
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasPositionProperties bool
Check if any position properties are set
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale?
final
maxLines int?
final
overflow TextOverflow?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel String?
final
softWrap bool?
final
style TextStyle?
final
textAlign TextAlign?
final
textDirection TextDirection?
final
textHeightBehavior TextHeightBehavior?
final
textScaler TextScaler?
final
textWidthBasis TextWidthBasis?
final

Methods

align(dynamic value) FlyText
Set text alignment - accepts String ('left', 'right', 'center', 'justify', 'start', 'end') or TextAlign
inherited
applyFlex(BuildContext context, Widget child) Widget
Apply flex properties to a widget
inherited
applyMargin(BuildContext context, Widget child) Widget
Applies margin to a widget using the resolved EdgeInsets
inherited
applyPadding(BuildContext context, Widget child) Widget
Applies padding to a widget using the resolved EdgeInsets
inherited
applyPosition(BuildContext context, Widget child) Widget
Apply position properties to a widget
inherited
applyTracking(BuildContext context, TextStyle? baseStyle) TextStyle
Applies tracking styling to a TextStyle using the resolved value
inherited
basis(String value) FlyText
Set flex basis - accepts String ('s32', 's40', 's48', etc.) This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
bottom(dynamic value) FlyText
Set bottom position - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
capitalize() FlyText
Transform text to capitalize first letter of each word
inherited
color(dynamic value) FlyText
Set text color - accepts Color object or String (token name/hex)
inherited
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
flex(dynamic value) FlyText
Set flex value - accepts int (1-12) or String ('auto', 'initial', 'none') This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
font(dynamic value) FlyText
Set font family - accepts:
inherited
getDefaultStyle(FlyStyle incomingStyle) FlyStyle
Override this to provide component-specific default styles The incoming flyStyle will be merged with these defaults
grow(int value) FlyText
Set flex grow - accepts int (0-2) This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
inset(dynamic value) FlyText
Set inset (all sides) - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
insetX(dynamic value) FlyText
Set insetX (left and right) - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
insetY(dynamic value) FlyText
Set insetY (top and bottom) - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
leading(dynamic value) FlyText
Set line height - accepts int, double, or String (token name like 'tight', 'normal', 'relaxed')
inherited
left(dynamic value) FlyText
Set left position - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
lineThrough() FlyText
Add line-through decoration to text
inherited
lowercase() FlyText
Transform text to lowercase
inherited
m(dynamic value) FlyText
Set uniform margin - accepts int, double, or String (token name/unit)
inherited
mb(dynamic value) FlyText
Set bottom margin - accepts int, double, or String (token name/unit)
inherited
ml(dynamic value) FlyText
Set left margin - accepts int, double, or String (token name/unit)
inherited
mr(dynamic value) FlyText
Set right margin - accepts int, double, or String (token name/unit)
inherited
mt(dynamic value) FlyText
Set top margin - accepts int, double, or String (token name/unit)
inherited
mx(dynamic value) FlyText
Set horizontal margin (left + right) - accepts int, double, or String (token name/unit)
inherited
my(dynamic value) FlyText
Set vertical margin (top + bottom) - accepts int, double, or String (token name/unit)
inherited
noDecoration() FlyText
Remove text decoration
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overline() FlyText
Add overline decoration to text
inherited
p(dynamic value) FlyText
Set uniform padding - accepts int, double, or String (token name/unit)
inherited
pb(dynamic value) FlyText
Set bottom padding - accepts int, double, or String (token name/unit)
inherited
pl(dynamic value) FlyText
Set left padding - accepts int, double, or String (token name/unit)
inherited
pr(dynamic value) FlyText
Set right padding - accepts int, double, or String (token name/unit)
inherited
pt(dynamic value) FlyText
Set top padding - accepts int, double, or String (token name/unit)
inherited
px(dynamic value) FlyText
Set horizontal padding (left + right) - accepts int, double, or String (token name/unit)
inherited
py(dynamic value) FlyText
Set vertical padding (top + bottom) - accepts int, double, or String (token name/unit)
inherited
resolveMargin(BuildContext context) EdgeInsets
Resolves margin from FlyStyle and FlyTheme into EdgeInsets
inherited
resolvePadding(BuildContext context) EdgeInsets
Resolves padding from FlyStyle and FlyTheme into EdgeInsets
inherited
resolveTracking(BuildContext context) double?
Resolves tracking styling from FlyStyle and FlyThemeData into double
inherited
Set right position - accepts int, double, or String (token name like 's2', 's4', etc.)
inherited
shrink(int value) FlyText
Set flex shrink - accepts int (0-1) This method can be chained with other flex methods, with later calls overriding earlier ones
inherited
text(dynamic value) FlyText
Set text style - accepts String (token name like 'sm', 'base', 'lg', etc.) or TextStyle Pass null to remove all text styling and use Flutter's default text style
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
top(dynamic value) FlyText
Set top position - accepts int, double, or String (token name like 's2', 's4', etc.)
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
tracking(dynamic value) FlyText
Set letter spacing - accepts int, double, or String (token name like 'tight', 'normal', 'wide')
inherited
underline() FlyText
Add underline decoration to text
inherited
uppercase() FlyText
Transform text to uppercase
inherited
weight(dynamic value) FlyText
Set font weight - accepts String ('thin', 'light', 'normal', 'medium', 'bold', etc.) or FontWeight
inherited

Operators

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