Skip to content
pubscout

readmore

3.0.0, released 3 years ago by getx.site

A Flutter widget that allows for expanding and collapsing text.

WASM-ready
$ flutter pub add readmore
Source repository

What it does

Provides a ReadMoreText widget that handles dynamic expansion and collapse of long text blocks. It also supports custom styling and interactions for patterns like hashtags, URLs, and mentions using annotations.

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

Use it when

  • You need to truncate long blocks of text with 'show more' and 'show less' toggles.
  • You want to highlight and interact with specific patterns like hashtags, mentions, or URLs inside text.

Skip it when

  • You need complex rich text editing capabilities.
  • You are not using Flutter.

Strengths

  • Supports dynamic expansion and collapse out of the box.
  • Provides annotation features for styling and interacting with patterns like URLs and hashtags.

Weaknesses

  • Limited to text truncation and pattern matching use cases.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

none

ReadMoreText(
  'Flutter is Google’s mobile UI open source framework...',
  trimMode: TrimMode.Line,
  trimLines: 2,
  colorClickableText: Colors.pink,
  trimCollapsedText: 'Show more',
  trimExpandedText: 'Show less',
  moreStyle: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
)

Alternatives

Packages that do the same job and could replace readmore.

  • re_editor

    A lightweight text and code editor widget for Flutter with syntax highlighting and folding.

  • rich_text_view

    RichTextView renders text with mentions, hashtags, emails, URLs and view‑more support.

  • see_more

    Expandable text widget with trim, linkify, annotations, fade, and programmatic control

  • linkfy_text

    A lightweight Flutter widget that detects URLs, emails and hashtags in text and makes them clickable.