Skip to content
pubscout

extended_text

15.0.2, released 2 years ago by fluttercandies.com

An extension of Flutter's official Text widget for special inline content and custom overflow.

WASM-ready
$ flutter pub add extended_text
Source repository

What it does

ExtendedText builds special text features quickly like inline images, mentions, or tags. It also supports custom background, overflow effects, gradients, and custom selection toolbars and handles.

AI-written summary of version 15.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need inline images inside your text (e.g. emojis or badges).
  • You require custom text overflow handling or positions like before, middle, or after.
  • You want custom background or gradients applied to specific spans of text.

Skip it when

  • Standard Flutter Text and RichText widgets already fully cover your project requirements.

Strengths

  • Enables quick construction of rich text based on text formats and special text spans.
  • Supports copying the actual value of special text instead of widget placeholder values.
  • Provides custom text overflow widget and control over overflow positions.

Weaknesses

  • Third-party extension library that relies on keeping up with upstream Flutter changes.
  • Requires writing custom builders for specialized text types.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Add extended_text to your pubspec.yaml dependencies.

class MySpecialTextSpanBuilder extends SpecialTextSpanBuilder {
  @override
  SpecialText createSpecialText(String flag, {TextStyle textStyle, SpecialTextGestureTapCallback onTap, int index}) {
    if (isStart(flag, AtText.flag)) {
      return AtText(textStyle, onTap, start: index - (AtText.flag.length - 1));
    }
    return null;
  }
}

Alternatives

Packages that do the same job and could replace extended_text.

Works with

Packages commonly used together with extended_text: ones it builds on, ones built on it, and its own family.