RoundedBackgroundTextSpan constructor
RoundedBackgroundTextSpan({
- required String text,
- TextStyle? style,
- Color? backgroundColor,
- TextScaler textScaler = TextScaler.noScaling,
- Locale? locale,
- TextBaseline? baseline,
- double? innerRadius,
- double? outerRadius,
- String? heroTag,
- 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,
super.baseline,
double? innerRadius,
double? outerRadius,
String? heroTag,
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,
),
),
);