RoundedBackgroundTextSpan constructor

RoundedBackgroundTextSpan({
  1. required String text,
  2. TextStyle? style,
  3. Color? backgroundColor,
  4. TextScaler textScaler = TextScaler.noScaling,
  5. Locale? locale,
  6. TextBaseline? baseline,
  7. double? innerRadius,
  8. double? outerRadius,
  9. TextAlign? textAlign,
})

Creates a text with rounded background with the given values

Implementation

RoundedBackgroundTextSpan({
  required this.text,
  TextStyle? style,
  Color? backgroundColor,
  TextScaler textScaler = TextScaler.noScaling,
  Locale? locale,
  TextBaseline? baseline,
  double? innerRadius,
  double? outerRadius,
  TextAlign? textAlign,
}) : super(
        child: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 8.0),
          child: RoundedBackgroundText(
            text,
            style: style,
            backgroundColor: backgroundColor,
            textScaler: textScaler,
            locale: locale,
            innerRadius: innerRadius ?? kDefaultInnerRadius,
            outerRadius: outerRadius ?? kDefaultOuterRadius,
            textAlign: textAlign,
            maxLines: 1,
          ),
        ),
        baseline: baseline,
      );