BadText constructor
const
BadText(
- String text, {
- Key? key,
- String? fontFamily,
- Color? color,
- double fontSize = 16,
- FontWeight fontWeight = FontWeight.w400,
- double? lineHeight,
- bool underline = false,
- bool italic = false,
- double letterSpacing = 0.0,
- List<
Shadow> ? shadows, - TextAlign textAlign = TextAlign.start,
- TextDirection textDirection = TextDirection.ltr,
- TextOverflow? overflow,
- int? maxLines,
NOTE: if overflow
is not specified, its default value depends on maxLines
:
- if
maxLines
is null,overflow
is null - if
maxLines
is not null,overflow
is TextOverflow.ellipsis
Implementation
const BadText(
this.text, {
super.key,
this.fontFamily,
this.color,
this.fontSize = 16,
this.fontWeight = FontWeight.w400,
double? lineHeight,
this.underline = false,
this.italic = false,
this.letterSpacing = 0.0,
this.shadows,
this.textAlign = TextAlign.start,
this.textDirection = TextDirection.ltr,
TextOverflow? overflow,
this.maxLines,
}) : selectable = false,
lineHeight = lineHeight ?? fontSize * 1.2,
overflow =
overflow ?? (maxLines == null ? null : TextOverflow.ellipsis);