TextSpanBuilder constructor
TextSpanBuilder({})
A span builder that creates TextSpan objects for censored text.
{@macro base_span_builder}
This implementation creates text-only spans, applying censoredStyle to censored portions and style to normal portions.
Example:
final builder = TextSpanBuilder(
censorIt: CensorIt.mask('Fuck this!'),
style: TextStyle(color: Colors.black),
censoredStyle: TextStyle(
color: Colors.red,
fontWeight: .bold,
),
);
final spans = builder.buildSpans(
revealAll: false,
);
Implementation
TextSpanBuilder({
required super.censorIt,
required super.style,
required this.censoredStyle,
});