PlatformText constructor

PlatformText(
  1. String data, {
  2. Key? key,
  3. TextStyle? style,
  4. TextAlign? textAlign,
  5. TextDirection? textDirection,
  6. bool? softWrap,
  7. TextOverflow? overflow,
  8. @Deprecated('Use textScaler instead. ' 'This feature was removed after version 3.16') double? textScaleFactor,
  9. TextScaler? textScaler,
  10. int? maxLines,
  11. Locale? locale,
  12. String? semanticsLabel,
  13. StrutStyle? strutStyle,
  14. TextWidthBasis? textWidthBasis,
  15. TextHeightBehavior? textHeightBehavior,
  16. Color? selectionColor,
})

Implementation

factory PlatformText(
  String data, {
  Key? key,
  TextStyle? style,
  TextAlign? textAlign,
  TextDirection? textDirection,
  bool? softWrap,
  TextOverflow? overflow,
  @Deprecated(
    'Use textScaler instead. '
    'This feature was removed after version 3.16',
  )
  double? textScaleFactor,
  TextScaler? textScaler,
  int? maxLines,
  Locale? locale,
  String? semanticsLabel,
  StrutStyle? strutStyle,
  TextWidthBasis? textWidthBasis,
  ui.TextHeightBehavior? textHeightBehavior,
  Color? selectionColor,
}) {
  return PlatformText._(
      key,
      (BuildContext context) => Text(
            formatData(context, data),
            key: key,
            style: style,
            textAlign: textAlign,
            textDirection: textDirection,
            softWrap: softWrap,
            overflow: overflow,
            textScaler: textScaler,
            maxLines: maxLines,
            locale: locale,
            semanticsLabel: semanticsLabel,
            strutStyle: strutStyle,
            textWidthBasis: textWidthBasis,
            textHeightBehavior: textHeightBehavior,
            selectionColor: selectionColor,
            //deprecated textScaleFactor: textScaleFactor,
          ));
}