readmore_flutter 1.0.0 copy "readmore_flutter: ^1.0.0" to clipboard
readmore_flutter: ^1.0.0 copied to clipboard

A Flutter package that provides a customizable 'Read More'/'Show Less' text widget with flexible truncation options.

ReadMore Flutter Package #

pub package License: MIT

A Flutter widget that truncates text with customizable "Read More" and "Show Less" functionality.

Features #

  • Truncate text by line or character length
  • Customizable "Read More" and "Show Less" text
  • Style customization for both text and buttons
  • Callbacks for expand/collapse events
  • Supports RTL and LTR text directions

Installation #

Add to your pubspec.yaml:

dependencies:
  readmore: ^1.0.0

Usage #

import 'package:readmore/readmore.dart';

ReadMoreText(
  'Your long text here...',
  trimLines: 2,
  trimMode: TrimMode.line,
  readMoreText: 'Show more',
  readLessText: 'Show less',
  moreStyle: TextStyle(color: Colors.blue),
  lessStyle: TextStyle(color: Colors.blue),
)

Parameters #

Parameter Description Default
text The text to display (required) -
trimLines Number of lines to show when trimmed 2
trimMode Truncate by line or length TrimMode.line
readMoreText "Read More" button text 'Read More'
readLessText "Show Less" button text 'Show Less'
moreStyle Style for "Read More" text Blue bold
lessStyle Style for "Show Less" text Blue bold

Screenshots #

Demo

2
likes
0
points
63
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides a customizable 'Read More'/'Show Less' text widget with flexible truncation options.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on readmore_flutter