headline5 static method
Text
headline5(
- String text, {
- TextAlign textAlign = TextAlign.left,
- TextDecoration decoration = TextDecoration.none,
- Color? color,
- TextOverflow textOverflow = TextOverflow.ellipsis,
- int? maxLines,
- bool isItalic = false,
- bool isUnderline = false,
- bool isOverline = false,
- bool isLineTrough = false,
- bool isBold = false,
- double? scaleFactor,
Implementation
static Text headline5(
String text, {
TextAlign textAlign = TextAlign.left,
TextDecoration decoration = TextDecoration.none,
Color? color,
TextOverflow textOverflow = TextOverflow.ellipsis,
int? maxLines,
bool isItalic = false,
bool isUnderline = false,
bool isOverline = false,
bool isLineTrough = false,
bool isBold = false,
double? scaleFactor,
}) {
return Text(
text,
textScaleFactor: scaleFactor,
maxLines: maxLines,
textAlign: textAlign,
overflow: textOverflow,
style: TextStyle(
fontStyle: isItalic ? FontStyle.italic : FontStyle.normal,
fontWeight: isBold ? FontWeight.bold : FontWeight.w400,
fontSize: 24.sp,
color: color,
letterSpacing: 0.0,
decoration: (isUnderline && isOverline && isLineTrough)
? TextDecoration.combine(
[
TextDecoration.underline,
TextDecoration.overline,
TextDecoration.lineThrough,
],
)
: (isUnderline && isOverline)
? TextDecoration.combine(
[
TextDecoration.underline,
TextDecoration.overline,
],
)
: (isUnderline && isLineTrough)
? TextDecoration.combine(
[
TextDecoration.underline,
TextDecoration.lineThrough,
],
)
: (isOverline && isLineTrough)
? TextDecoration.combine(
[
TextDecoration.overline,
TextDecoration.lineThrough,
],
)
: isUnderline
? TextDecoration.underline
: isOverline
? TextDecoration.overline
: isLineTrough
? TextDecoration.lineThrough
: TextDecoration.none,
),
);
}