getParagraphStyle method
The style information for paragraphs, encoded for use by dart:ui
.
The textScaleFactor
argument must not be null. If omitted, it defaults
to 1.0. The other arguments may be null. The maxLines
argument, if
specified and non-null, must be greater than zero.
If the font size on this style isn't set, it will default to 14 logical pixels.
Implementation
ui.ParagraphStyle getParagraphStyle({
TextAlign textAlign,
TextDirection textDirection,
double textScaleFactor = 1.0,
String ellipsis,
int maxLines,
Locale locale,
}) {
assert(textScaleFactor != null);
assert(maxLines == null || maxLines > 0);
return ui.ParagraphStyle(
textAlign: textAlign,
textDirection: textDirection,
fontWeight: fontWeight,
fontStyle: fontStyle,
fontFamily: fontFamily,
fontSize: (fontSize ?? _defaultFontSize) * textScaleFactor,
lineHeight: height,
maxLines: maxLines,
ellipsis: ellipsis,
locale: locale,
);
}