extended_text_library 0.5.3

extended_text_library #

pub package

library for extended_text and extended_text_field.

extended_text #

pub package GitHub stars GitHub forks GitHub license GitHub issues flutter-candies

Extended official text to build special text like inline image or @somebody quickly,it also support custom background,custom over flow and custom selection toolbar and handles.

extended_text_field #

pub package GitHub stars GitHub forks GitHub license GitHub issues flutter-candies

Extended official text field to build special text like inline image, @somebody, custom background etc quickly.It also support to build custom seleciton toolbar and handles.


  • fix error about TargetPlatform.macOS


  • fix issue that TextPainter was not layout(ExtendedText)


  • set limitation of flutter sdk >=1.12.13


  • codes base on 1.12.13+hotfix.5
  • breaking change: CupertinoExtendedTextSelectionControls => ExtendedCupertinoTextSelectionControls MaterialExtendedTextSelectionControls => ExtendedMaterialTextSelectionControls
  • extract method for TextSelection


  • workaround about wrong selection position of WidgetSpan


  • fix issue that ImageSpan's padding can't be null.
  • add behavior for ImageSpan


  • change kMinInteractiveSize to kExtendedMinInteractiveSize


  • fix null exception of effectiveOffset in getCaretOffset method


  • fix kMinInteractiveSize is missing in high version of flutter


  • add common selection library for extended_text and extended_text_field


  • set default value('\uFFFC') of actualText for ExtendedWidgetSpan
  • add onTap call back for ImageSpan
  • change return type to TextSpan for SpecialTextSpanBuilder's Build method


  • improve codes base on v1.7.8
  • support WidgetSpan (ExtendedWidgetSpan)


  • add textSpanNestToArray and textSpanToActualText


  • move extended_text_utils from extended_text_field


  • remove caretIn parameter(SpecialTextSpan)
  • deleteAll parameter has the same effect as caretIn parameter(SpecialTextSpan)


  • add caretIn parameter(whether caret can be move into special text for SpecialTextSpan(like a image span or @xxxx)) for SpecialTextSpan


  • add GestureRecognizer for image span


  • handle image loaded failed for image span


  • remove CachedNetworkImage


  • update deafult build method in SpecialTextSpanBuilder


  • change cacheImageFolderName from "extenedtext" to "cacheimage"


  • add BackgroundTextSpan, support to paint custom background


  • override compareTo method in SpecialTextSpan and ImageSpan to fix issue that image span or special text span was error rendering


  • fix start index is not right in SpecialTextSpanBuilder
  • override == and hashCode for ImageSpan


  • override == and hashCode for SpecialTextSpan
  • update build method in SpecialTextSpanBuilder


  • add deleteAll parameter for SpecialTextSpan


  • add following to support extended_text and extended_text_field cached_network_image.dart extended_text_utils.dart image_span.dart special_text_span_base.dart special_text_span_builder.dart

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  extended_text_library: ^0.5.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:extended_text_library/extended_text_library.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 12, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/src/render_object/extended_text_selection_render_object.dart.

Run flutter format to format lib/src/render_object/extended_text_selection_render_object.dart.

Format lib/src/selection/cupertino_text_selection_controls.dart.

Run flutter format to format lib/src/selection/cupertino_text_selection_controls.dart.

Format lib/src/selection/extended_text_selection_overlay.dart.

Run flutter format to format lib/src/selection/extended_text_selection_overlay.dart.

Format lib/src/selection/material_text_selection_controls.dart.

Run flutter format to format lib/src/selection/material_text_selection_controls.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies