WrappableText constructor
WrappableText({
- Key? key,
- required TextSpan text,
- FCClear clear = FCClear.none,
- TextAlign? textAlign,
- TextDirection? textDirection,
- TextOverflow? overflow,
- @Deprecated('Use textScaler instead. ' 'Use of textScaleFactor was deprecated in preparation for the upcoming ' 'nonlinear text scaling support. ' 'This feature was deprecated after v3.12.0-2.0.pre.') double textScaleFactor = 1.0,
- TextScaler textScaler = TextScaler.noScaling,
- int? maxLines,
- Locale? locale,
- StrutStyle? strutStyle,
- TextHeightBehavior? textHeightBehavior,
- double indent = 0.0,
- EdgeInsetsGeometry margin = EdgeInsets.zero,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
Creates a paragraph of rich text, that when used in a FloatColumn
can
wrap around floated siblings.
The text, clear, and indent arguments must not be null.
The textDirection, if null, defaults to the ambient Directionality
,
which in that case must not be null.
Implementation
WrappableText({
this.key,
required this.text,
this.clear = FCClear.none,
this.textAlign,
this.textDirection,
this.overflow,
@Deprecated(
'Use textScaler instead. '
'Use of textScaleFactor was deprecated in preparation for the upcoming '
'nonlinear text scaling support. '
'This feature was deprecated after v3.12.0-2.0.pre.',
)
double textScaleFactor = 1.0,
TextScaler textScaler = TextScaler.noScaling,
this.maxLines,
this.locale,
this.strutStyle,
this.textHeightBehavior,
this.indent = 0.0,
this.margin = EdgeInsets.zero,
this.padding = EdgeInsets.zero,
}) : assert(
// ignore: unnecessary_null_comparison
text != null,
'A non-null TextSpan must be provided to a WrappableText.',
),
assert(
textScaleFactor == 1.0 ||
identical(textScaler, TextScaler.noScaling),
'Use textScaler instead.'),
textScaler = _effectiveTextScalerFrom(textScaler, textScaleFactor),
assert(maxLines == null || maxLines > 0);