WrappableText constructor

const WrappableText({
  1. Key? key,
  2. required TextSpan text,
  3. FCClear clear = FCClear.none,
  4. TextAlign? textAlign,
  5. TextDirection? textDirection,
  6. TextOverflow? overflow,
  7. double? textScaleFactor,
  8. int? maxLines,
  9. Locale? locale,
  10. StrutStyle? strutStyle,
  11. TextHeightBehavior? textHeightBehavior,
  12. double indent = 0.0,
  13. EdgeInsetsGeometry margin = EdgeInsets.zero,
  14. EdgeInsetsGeometry padding = EdgeInsets.zero,
})

Creates a paragraph of rich text, that when used in a FloatColumn can wrap around floated siblings.

The text, clear, textAlign, indent, and textScaleFactor arguments must not be null.

The textDirection, if null, defaults to the ambient Directionality, which in that case must not be null.

Implementation

const WrappableText({
  this.key,
  required this.text,
  this.clear = FCClear.none,
  this.textAlign,
  this.textDirection,
  this.overflow,
  this.textScaleFactor,
  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(maxLines == null || maxLines > 0);