readmoretext

A Flutter plugin that allows for expanding and collapsing text with the added capability to style and interact with specific patterns in the text like hashtags, URLs, and mentions using the Annotation feature.

Usage:

Add the package to your pubspec.yaml:

readmoretext: ^1.0.0

Then, import it in your Dart code:

import 'package:readmoretext/read_more_text_plus.dart';

Basic Example

 ReadMoreTextWidget(
 message:"Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.It is fast, productive, and flexible, allowing developers to create high-performance apps with expressive and flexible designs.With Flutter, you can build apps for iOS, Android, Windows, Mac, Linux,and the web using the same codebase. It features a rich set of pre-designed widgets,hot reload for quick development cycles, and a strong community that contributes to a growing ecosystem of packages and plugins.",
    onChange: () {},
    charCount: 50,
   isReadMore: true,
);

Using Annotations

The Annotation feature enhances the interactivity and functionality of the text content. You can define custom styles and interactions for patterns like hashtags, URLs, and mentions.

Note: This feature is not available with the ReadMoreText.rich constructor, as TextSpan gives you total control over styling and adding interactions to parts of the text.