BaseSpanBuilder<TSpan extends InlineSpan> constructor

BaseSpanBuilder<TSpan extends InlineSpan>({
  1. required CensorIt censorIt,
  2. required TextStyle style,
})

Abstract base class for building text spans with censored content.

This class provides a common interface for creating InlineSpan objects that represent text with censored profanity. Subclasses must implement buildPlainSpan and buildCensoredSpan to define how normal and censored text are rendered.

The buildSpans method handles the logic of splitting text into spans, calling the appropriate builder methods for normal and censored portions.

Type parameter:

  • TSpan - The type of InlineSpan this builder creates

See also:

Implementation

BaseSpanBuilder({
  required this.censorIt,
  required this.style,
});