of static method

Text of(
  1. Text? text, {
  2. Key? key,
  3. TextStyle? style,
  4. StrutStyle? strutStyle,
  5. TextAlign? textAlign,
  6. TextDirection? textDirection,
  7. Locale? locale,
  8. bool? softWrap,
  9. TextOverflow? overflow,
  10. double? textScaleFactor,
  11. int? maxLines,
  12. String? semanticsLabel,
  13. TextWidthBasis? textWidthBasis,
})

Convert a Text object to one with a translation.

Implementation

static Text of(
  Text? text, {
  Key? key,
  TextStyle? style,
  StrutStyle? strutStyle,
  TextAlign? textAlign,
  TextDirection? textDirection,
  Locale? locale,
  bool? softWrap,
  TextOverflow? overflow,
  double? textScaleFactor,
  int? maxLines,
  String? semanticsLabel,
  TextWidthBasis? textWidthBasis,
}) =>
    t(
      text?.data,
      key: key ?? text?.key,
      style: style ?? text?.style,
      strutStyle: strutStyle ?? text?.strutStyle,
      textAlign: textAlign ?? text?.textAlign,
      textDirection: textDirection ?? text?.textDirection,
      locale: locale ?? text?.locale,
      softWrap: softWrap ?? text?.softWrap,
      overflow: overflow ?? text?.overflow,
      textScaleFactor: textScaleFactor ?? text?.textScaleFactor,
      maxLines: maxLines ?? text?.maxLines,
      semanticsLabel: semanticsLabel ?? text?.semanticsLabel,
      textWidthBasis: textWidthBasis ?? text?.textWidthBasis,
    );