ggtext function

Widget ggtext({
  1. Style? style,
  2. String text = "",
  3. Locale? locale,
  4. bool? softWrap,
  5. TextOverflow? overflow,
  6. int? maxLines,
  7. String? semanticsLabel,
  8. TextWidthBasis? textWidthBasis,
  9. TextAlign? textAlign,
  10. Color? selectionColor,
  11. TextDirection? textDirection,
  12. StrutStyle? strutStyle,
  13. TextScaler? textScaler,
})

Implementation

Widget ggtext(
    {Style? style,
    String text = "",
    Locale? locale,
    bool? softWrap,
    TextOverflow? overflow,
    int? maxLines,
    String? semanticsLabel,
    TextWidthBasis? textWidthBasis,
    TextAlign? textAlign,
    Color? selectionColor,
    TextDirection? textDirection,
    StrutStyle? strutStyle,
    TextScaler? textScaler}) {
  Style styleProps = style ?? Style();
  Widget widget = Text(
    text,
    style: styleProps.textStyle,
    locale: locale,
    softWrap: softWrap,
    overflow: overflow,
    maxLines: maxLines,
    semanticsLabel: semanticsLabel,
    textWidthBasis: textWidthBasis,
    textAlign: textAlign,
    selectionColor: selectionColor,
    textDirection: textDirection,
    strutStyle: strutStyle,
    textScaler: textScaler,
  );

  widget = flexManager(props: styleProps, children: [widget]);
  return runManagerList(style: styleProps, widgetOld: widget);
}