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.
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.
- selectable
A widget that enables text selection across multiple text widgets.
77Compare - flutter_painter
A Flutter widget for drawing scribbles, text, shapes and images on a canvas.
74Compare - re_editor
A lightweight text and code editor widget for Flutter with syntax highlighting and folding.
80Compare - gradient_elevated_button
Custom elevated button with gradient background for Flutter apps
58Compare
Works with
Packages commonly used together with extended_text: ones it builds on, ones built on it, and its own family.
- extended_text_libraryextended_text depends on itProvides extended Text and TextField widgets with inline images, custom backgrounds, and advanced selection handling.
- extended_imageSame familyExtended image library with caching, placeholders, zoom/pan, slide-out, and crop editor.
- extended_image_librarySame familyImage handling library with extended features like caching, zoom, editor, and placeholder support.
- extended_nested_scroll_viewSame familyExtended nested scroll view to fix pinned header and inner scrollables sync issues.
- extended_text_fieldSame familyExtended text field to quickly build inline images, @mentions, custom backgrounds and selection tools.
- extended_tabsSame familyAn extension library for Flutter Tabs, TabBar, and TabView with advanced scrolling support.
- extended_sliverSame familyA powerful extension library of Sliver with custom headers and adapters.
- extended_listSame familyExtended list widgets with garbage collection, viewport tracking and trailing layout support.