TextStyler class
- Inheritance
-
- Mixed-in types
-
Constructors
-
TextStyler({TextOverflow? overflow, StrutStyleMix? strutStyle, TextAlign? textAlign, TextScaler? textScaler, int? maxLines, TextStyleMix? style, TextWidthBasis? textWidthBasis, TextHeightBehaviorMix? textHeightBehavior, TextDirection? textDirection, bool? softWrap, List<Directive<String>>? textDirectives, Color? selectionColor, String? semanticsLabel, Locale? locale, AnimationConfig? animation, WidgetModifierConfig? modifier, List<VariantStyle<TextSpec>>? variants})
-
-
TextStyler.background(Paint value)
-
factory
-
TextStyler.backgroundColor(Color value)
-
factory
-
TextStyler.capitalize()
-
factory
-
TextStyler.color(Color value)
-
factory
-
TextStyler.create({Prop<TextOverflow>? overflow, Prop<StrutStyle>? strutStyle, Prop<TextAlign>? textAlign, Prop<TextScaler>? textScaler, Prop<int>? maxLines, Prop<TextStyle>? style, Prop<TextWidthBasis>? textWidthBasis, Prop<TextHeightBehavior>? textHeightBehavior, Prop<TextDirection>? textDirection, Prop<bool>? softWrap, List<Directive<String>>? textDirectives, Prop<Color>? selectionColor, Prop<String>? semanticsLabel, Prop<Locale>? locale, List<VariantStyle<TextSpec>>? variants, WidgetModifierConfig? modifier, AnimationConfig? animation})
-
const
-
TextStyler.decoration(TextDecoration value)
-
factory
-
TextStyler.decorationColor(Color value)
-
factory
-
TextStyler.decorationStyle(TextDecorationStyle value)
-
factory
-
TextStyler.decorationThickness(double value)
-
factory
-
TextStyler.directive(Directive<String> value)
-
factory
-
TextStyler.fontFamily(String value)
-
factory
-
TextStyler.fontFamilyFallback(List<String> value)
-
factory
-
TextStyler.fontFeatures(List<FontFeature> value)
-
factory
-
TextStyler.fontSize(double value)
-
factory
-
TextStyler.fontStyle(FontStyle value)
-
factory
-
TextStyler.fontVariations(List<FontVariation> value)
-
factory
-
TextStyler.fontWeight(FontWeight value)
-
factory
-
TextStyler.foreground(Paint value)
-
factory
-
TextStyler.height(double value)
-
factory
-
TextStyler.letterSpacing(double value)
-
factory
-
TextStyler.locale(Locale value)
-
factory
-
TextStyler.lowercase()
-
factory
-
TextStyler.maxLines(int value)
-
factory
-
TextStyler.overflow(TextOverflow value)
-
factory
-
TextStyler.selectionColor(Color value)
-
factory
-
TextStyler.sentencecase()
-
factory
-
TextStyler.shadow(ShadowMix value)
-
factory
-
TextStyler.shadows(List<ShadowMix> value)
-
factory
-
TextStyler.softWrap(bool value)
-
factory
-
TextStyler.strutStyle(StrutStyleMix value)
-
factory
-
TextStyler.style(TextStyleMix value)
-
factory
-
TextStyler.textAlign(TextAlign value)
-
factory
-
TextStyler.textBaseline(TextBaseline value)
-
factory
-
TextStyler.textDirection(TextDirection value)
-
factory
-
TextStyler.textDirective(Directive<String> value)
-
factory
-
TextStyler.textHeightBehavior(TextHeightBehaviorMix value)
-
factory
-
TextStyler.textScaler(TextScaler value)
-
factory
-
TextStyler.textWidthBasis(TextWidthBasis value)
-
factory
-
TextStyler.titlecase()
-
factory
-
TextStyler.uppercase()
-
factory
-
TextStyler.wordSpacing(double value)
-
factory
Methods
-
animate(AnimationConfig value)
→ TextStyler
-
Sets the animation configuration.
override
-
applyVariants(Iterable<NamedVariant> variantsToApply)
→ TextStyler
-
Applies the specified named variants by merging their styles into this style.
inherited
-
background(Paint value)
→ TextStyler
-
Sets background paint
inherited
-
backgroundColor(Color value)
→ TextStyler
-
Sets background color
inherited
-
build(BuildContext context, {Set<NamedVariant> namedVariants = const {}})
→ StyleSpec<TextSpec>
-
Builds the style into a fully resolved spec with metadata.
inherited
-
call(String text, {Key? key})
→ StyledText
-
-
capitalize()
→ TextStyler
-
-
color(Color value)
→ TextStyler
-
Sets text color
inherited
-
debugFillProperties(DiagnosticPropertiesBuilder properties)
→ void
-
Add additional properties associated with the node.
override
-
debugLabel(String value)
→ TextStyler
-
Sets debug label
inherited
-
decoration(TextDecoration value)
→ TextStyler
-
Sets text decoration
inherited
-
decorationColor(Color value)
→ TextStyler
-
Sets decoration color
inherited
-
decorationStyle(TextDecorationStyle value)
→ TextStyler
-
Sets decoration style
inherited
-
decorationThickness(double value)
→ TextStyler
-
Sets decoration thickness
inherited
-
directive(Directive<String> value)
→ TextStyler
-
-
fontFamily(String value)
→ TextStyler
-
Sets font family
inherited
-
fontFamilyFallback(List<String> value)
→ TextStyler
-
Sets font family fallback
inherited
-
fontFeatures(List<FontFeature> value)
→ TextStyler
-
Sets font features
inherited
-
fontSize(double value)
→ TextStyler
-
Sets font size
inherited
-
fontStyle(FontStyle value)
→ TextStyler
-
Sets font style
inherited
-
fontVariations(List<FontVariation> value)
→ TextStyler
-
Sets font variations
inherited
-
fontWeight(FontWeight value)
→ TextStyler
-
Sets font weight
inherited
-
foreground(Paint value)
→ TextStyler
-
Sets foreground paint
inherited
-
getDiff(Equatable other)
→ Map<String, String>
-
Returns a map of properties that differ between this object and another.
inherited
-
height(double value)
→ TextStyler
-
Sets line height
inherited
-
inherit(bool value)
→ TextStyler
-
Sets inherit property
inherited
-
keyframeAnimation({Listenable? trigger, required List<KeyframeTrack> timeline, required KeyframeStyleBuilder<TextSpec, TextStyler> styleBuilder})
→ TextStyler
-
Creates a keyframe animation. It will animate through the given timeline.
inherited
-
letterSpacing(double value)
→ TextStyler
-
Sets letter spacing
inherited
-
locale(Locale value)
→ TextStyler
-
Sets the locale.
-
lowercase()
→ TextStyler
-
-
maxLines(int value)
→ TextStyler
-
Sets the maxLines.
-
merge(covariant TextStyler? other)
→ TextStyler
-
Merges with another TextStyler.
override
-
mergeActiveVariants(BuildContext context, {required Set<NamedVariant> namedVariants})
→ Style<TextSpec>
-
Merges all active variants with their nested variants recursively.
inherited
-
modifier(WidgetModifierConfig value)
→ TextStyler
-
Sets the widget modifier.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onAndroid(TextStyler style)
→ TextStyler
-
Creates a variant for Android platform.
inherited
-
onBreakpoint(Breakpoint breakpoint, TextStyler style)
→ TextStyler
-
Creates a variant based on the specified breakpoint.
inherited
-
onBuilder(TextStyler fn(BuildContext context))
→ TextStyler
-
Creates a variant using a builder function that receives the build context.
inherited
-
onDark(TextStyler style)
→ TextStyler
-
Creates a variant for dark mode.
inherited
-
onDesktop(TextStyler style)
→ TextStyler
-
Creates a variant for desktop breakpoint.
inherited
-
onDisabled(TextStyler style)
→ TextStyler
-
Creates a variant for disabled state
inherited
-
onEnabled(TextStyler style)
→ TextStyler
-
Creates a variant for enabled state (opposite of disabled)
inherited
-
onFocused(TextStyler style)
→ TextStyler
-
Creates a variant for focused state.
inherited
-
onFocusVisible(TextStyler style)
→ TextStyler
-
Creates a variant for focus shown in Flutter's traditional highlight mode.
inherited
-
onFuchsia(TextStyler style)
→ TextStyler
-
Creates a variant for Fuchsia platform.
inherited
-
onHovered(TextStyler style)
→ TextStyler
-
Creates a variant for hover state
inherited
-
onIos(TextStyler style)
→ TextStyler
-
Creates a variant for iOS platform.
inherited
-
onLandscape(TextStyler style)
→ TextStyler
-
Creates a variant for landscape device orientation.
inherited
-
onLight(TextStyler style)
→ TextStyler
-
Creates a variant for light mode.
inherited
-
onLinux(TextStyler style)
→ TextStyler
-
Creates a variant for Linux platform.
inherited
-
onLtr(TextStyler style)
→ TextStyler
-
Creates a variant for left-to-right text direction.
inherited
-
onMacos(TextStyler style)
→ TextStyler
-
Creates a variant for macOS platform.
inherited
-
onMobile(TextStyler style)
→ TextStyler
-
Creates a variant for mobile breakpoint.
inherited
-
onNot(ContextVariant contextVariant, TextStyler style)
→ TextStyler
-
Creates a variant for when the context does NOT match the provided variant.
inherited
-
onPortrait(TextStyler style)
→ TextStyler
-
Creates a variant for portrait device orientation.
inherited
-
onPressed(TextStyler style)
→ TextStyler
-
Creates a variant for pressed state
inherited
-
onRtl(TextStyler style)
→ TextStyler
-
Creates a variant for right-to-left text direction.
inherited
-
onTablet(TextStyler style)
→ TextStyler
-
Creates a variant for tablet breakpoint.
inherited
-
onWeb(TextStyler style)
→ TextStyler
-
Creates a variant for web platform.
inherited
-
onWindows(TextStyler style)
→ TextStyler
-
Creates a variant for Windows platform.
inherited
-
overflow(TextOverflow value)
→ TextStyler
-
Sets the overflow.
-
phaseAnimation<P>({Listenable? trigger, required List<P> phases, required TextStyler styleBuilder(P phase, TextStyler style), required CurveAnimationConfig configBuilder(P phase)})
→ TextStyler
-
Creates a phase animation. It will animate through the given phases.
inherited
-
resolve(BuildContext context)
→ StyleSpec<TextSpec>
-
Resolves to StyleSpec<TextSpec> using
context.
override
-
selectionColor(Color value)
→ TextStyler
-
Sets the selectionColor.
-
semanticsLabel(String value)
→ TextStyler
-
Sets the semanticsLabel.
-
sentencecase()
→ TextStyler
-
-
shadow(ShadowMix value)
→ TextStyler
-
Sets a single text shadow.
inherited
-
shadows(List<ShadowMix> value)
→ TextStyler
-
Sets text shadows
inherited
-
softWrap(bool value)
→ TextStyler
-
Sets the softWrap.
-
strutStyle(StrutStyleMix value)
→ TextStyler
-
Sets the strutStyle.
-
style(TextStyleMix value)
→ TextStyler
-
Sets the style.
override
-
textAlign(TextAlign value)
→ TextStyler
-
Sets the textAlign.
-
textBaseline(TextBaseline value)
→ TextStyler
-
Sets text baseline
inherited
-
textDirection(TextDirection value)
→ TextStyler
-
Sets the textDirection.
-
textDirective(Directive<String> value)
→ TextStyler
-
-
textHeightBehavior(TextHeightBehaviorMix value)
→ TextStyler
-
Sets the textHeightBehavior.
-
textScaler(TextScaler value)
→ TextStyler
-
Sets the textScaler.
-
textWidthBasis(TextWidthBasis value)
→ TextStyler
-
Sets the textWidthBasis.
-
titlecase()
→ TextStyler
-
-
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
-
uppercase()
→ TextStyler
-
-
variant(Variant variant, TextStyler style)
→ TextStyler
-
Must be implemented by the class using this mixin
inherited
-
variants(List<VariantStyle<TextSpec>> value)
→ TextStyler
-
Sets the style variants.
override
-
wordSpacing(double value)
→ TextStyler
-
Sets word spacing
inherited
-
wrap(WidgetModifierConfig value)
→ TextStyler
-
Wraps with a widget modifier.
override
Operators
-
operator ==(Object other)
→ bool
-
Overrides the equality operator to compare based on the properties.
inherited