CustomText class

this is the custom text which have mutliple named constructors, you can use as per your ease of access, also you can customize the global styling by initializing the style in the CustomTextStyle.init function in the main

Inheritance

Constructors

CustomText.appbarText(String text, {Key? key, bool? softWrap = true, StrutStyle? strutStyle, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of app bar text
CustomText.bodyText1(String text, {Key? key, StrutStyle? strutStyle, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), bool? softWrap = true, TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of body text 1
CustomText.bodyText2(String text, {Key? key, TextStyle? style, bool? softWrap = true, StrutStyle? strutStyle, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of body text 2
CustomText.buttonText(String text, {Key? key, StrutStyle? strutStyle, bool? softWrap = true, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of button text
CustomText.drawerText(String text, {Key? key, StrutStyle? strutStyle, bool? softWrap = true, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of drawer text
CustomText.heading(String text, {Key? key, bool? softWrap = true, StrutStyle? strutStyle, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of heading
CustomText.headingLarge(String text, {Key? key, bool? softWrap = true, StrutStyle? strutStyle, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of headingLarge
CustomText.headingSmall(String text, {Key? key, bool? softWrap = true, StrutStyle? strutStyle, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of heading small
CustomText.settingsText(String text, {Key? key, StrutStyle? strutStyle, bool? softWrap = true, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of settings text
CustomText.smallText(String text, {Key? key, StrutStyle? strutStyle, bool? softWrap = true, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of small text
CustomText.textFieldHeading(String text, {Key? key, StrutStyle? strutStyle, bool? softWrap = true, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of text field heading
CustomText.textFieldHint(String text, {Key? key, StrutStyle? strutStyle, bool? softWrap = true, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of text field hint text
CustomText.textFieldText(String text, {Key? key, StrutStyle? strutStyle, bool? softWrap = true, String? semanticsLabel, String? semanticsIdentifier, TextWidthBasis? textWidthBasis = TextWidthBasis.parent, TextScaler? textScaler = const TextScaler.linear(1.2), TextHeightBehavior? textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false), Color? selectionColor = Colors.yellow, TextStyle? style, double? fontSize, double increamentFontSize = 0, FontStyle? fontStyle, FontWeight? fontWeight, String? fontFamily, Color? color, Color? backgroundColor, double? height, int? maxLines, TextOverflow? overflow, TextDirection? textDirection, TextAlign? textAlign, TextDecoration? decoration, double? decorationThickness, TextDecorationStyle? decorationStyle, Paint? backgroundPaint, Paint? foregroundPaint, String? debugLabel, bool? inherit, List<String>? fontFamilyFallback, List<FontFeature>? fontFeatures, List<FontVariation>? fontVariations, TextLeadingDistribution? leadingDistribution, double? letterSpacing, Locale? locale, String? package, List<Shadow>? shadows, TextBaseline? textBaseline, double? wordSpacing})
this is the constructor of text field text

Properties

backgroundColor → Color?
this is the backgroundColor of the custom text
final
backgroundPaint → Paint?
this is the backgroundPaint of the custom text
final
color → Color?
this is the color of the custom text
final
debugLabel → String?
this is the debugLabel of the custom text
final
decoration → TextDecoration?
this is the decoration of the custom text
final
decorationStyle → TextDecorationStyle?
this is the decorationStyle of the custom text
final
decorationThickness → double?
this is the decorationThickness of the custom text
final
fontFamily → String?
this is the fontFamily of the custom text
final
fontFamilyFallback → List<String>?
this is the fontFamilyFallback of the custom text
final
fontFeatures → List<FontFeature>?
this is the fontFeatures of the custom text
final
fontSize → double?
this is the fontSize of the custom text
final
fontStyle → FontStyle?
this is the fontStyle of the custom text
final
fontVariations → List<FontVariation>?
this is the fontVariations of the custom text
final
fontWeight → FontWeight?
this is the fontWeight of the custom text
final
foregroundPaint → Paint?
this is the foregroundPaint of the custom text
final
hashCode → int
The hash code for this object.
no setterinherited
height → double?
this is the height of the custom text
final
increamentFontSize → double
this is the increamentFontSize of the custom text
final
inherit → bool?
this is the inherit of the custom text
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingDistribution → TextLeadingDistribution?
this is the leadingDistribution of the custom text
final
letterSpacing → double?
this is the letterSpacing of the custom text
final
locale → Locale?
this is the locale of the custom text
final
maxLines → int?
this is the maxLines of the custom text
final
overflow → TextOverflow?
this is the overflow of the custom text
final
package → String?
this is the package of the custom text
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectionColor → Color?
Sets the background color of selected text
final
semanticsIdentifier → String?
Unique identifier for UI testing and automation
final
semanticsLabel → String?
Accessibility label read by screen readers instead of visible text
final
shadows → List<Shadow>?
this is the shadows of the custom text
final
softWrap → bool?
Controls whether the text wraps to the next line when it overflows horizontally
final
strutStyle → StrutStyle?
Controls the minimum line height and vertical spacing of the text
final
style → TextStyle
this is the style of the custom text
final
text → String
this is the text of the custom text
final
textAlign → TextAlign?
this is the textAlign of the custom text
final
textBaseline → TextBaseline?
this is the textBaseline of the custom text
final
textDirection → TextDirection?
this is the textDirection of the custom text
final
textHeightBehavior → TextHeightBehavior?
Defines how line height is applied above and below text
final
textScaler → TextScaler?
Scales the text size relative to the base font size
final
textWidthBasis → TextWidthBasis?
Controls whether text width is based on the longest line or the parent width
final
wordSpacing → double?
this is the wordSpacing of the custom text
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