StyledText constructor
const
StyledText(
- String text,
- TextStyle style, {
- Key? key,
- TextAlign? align,
- int? maxLines,
- TextOverflow? overflow,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- StrutStyle? strutStyle,
Creates a StyledText widget.
text is the string to display.
style is the text style to apply.
Optional parameters allow further customization:
alignsets the text alignment.maxLineslimits the number of lines.overflowdetermines how overflowed text is displayed.textDirectionsets the text reading direction.localesets the locale for formatting.softWrapindicates whether text should wrap at soft line breaks.strutStyleprovides strut style for vertical spacing.
Implementation
const StyledText(
this.text,
this.style, {
super.key,
this.align,
this.maxLines,
this.overflow,
this.textDirection,
this.locale,
this.softWrap,
this.strutStyle,
});