Skip to content
pubscout

rich_readmore

1.1.1, released 3 years ago by thierryoliveira.com

A Flutter widget that trims long text and toggles show more/less.

WASM-ready
$ flutter pub add rich_readmore
Source repository

What it does

RichReadMoreText displays a piece of text and collapses it either by line count or character length. When the content exceeds the limit it shows a clickable toggle to expand or collapse the text.

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

Use it when

  • You need a simple read‑more/less UI for long paragraphs
  • You want customizable styles and callbacks for the toggle

Skip it when

  • You require rich markdown rendering or complex text layout
  • You need animated transitions for expanding/collapsing

Strengths

  • Easy to integrate with just one widget
  • Supports both TextSpan and plain String inputs
  • Customizable toggle text, styles, and callbacks

Weaknesses

  • Only provides basic trimming, no advanced animations
  • Limited to text; not a full rich‑content solution

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
RichReadMoreText(
  textSpan,
  settings: LineModeSettings(
    trimLines: 3,
    trimCollapsedText: 'Expand',
    trimExpandedText: 'Collapse',
    onPressReadMore: () {},
    onPressReadLess: () {},
  ),
);

Alternatives

Packages that do the same job and could replace rich_readmore.

  • auto_size_text

    Fits text within a given space without needing a read‑more toggle, useful when you just want auto‑scaling rather than collapsing