RichText constructor
Creates a paragraph of rich text.
The text
, textAlign
, softWrap
, overflow
, and textScaleFactor
arguments must not be null.
The maxLines
property may be null (and indeed defaults to null), but if
it is not null, it must be greater than zero.
The textDirection
, if null, defaults to the ambient Directionality,
which in that case must not be null.
Implementation
const RichText({
Key key,
@required this.text,
this.textAlign = TextAlign.start,
this.textDirection,
this.softWrap = true,
this.overflow = TextOverflow.clip,
this.textScaleFactor = 1.0,
this.maxLines,
this.locale,
}) : assert(text != null),
assert(textAlign != null),
assert(softWrap != null),
assert(overflow != null),
assert(textScaleFactor != null),
assert(maxLines == null || maxLines > 0),
super(key: key);