Skip to content

Commit

Permalink
version 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maRci002 committed Mar 30, 2024
1 parent 9543970 commit 630764c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [3.1.0]

Contributed by [@maRci002](https://github.com/maRci002) - see PR [#59](https://github.com/jonataslaw/readmore/pull/59).

- Added `ReadMoreText.rich` constructor for rich text formatting and interactivity, enhancing text presentation with customizable styles and interactive elements.

## [3.0.0]

Contributed by [@maRci002](https://github.com/maRci002) - see PR [#54](https://github.com/jonataslaw/readmore/pull/54).
Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,37 @@ ReadMoreText(
);
```

### Rich Text Example

With the `ReadMoreText.rich` constructor, you can create text with rich formatting, including different colors, decorations, letter spacing, and interactive elements within a single widget.

```dart
ReadMoreText.rich(
TextSpan(
style: const TextStyle(color: Colors.black),
children: [
const TextSpan(text: 'Rich '),
const TextSpan(
text: 'Text',
style: TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline,
letterSpacing: 5,
recognizer: TapGestureRecognizer()..onTap = () {
// Handle tap
},
),
),
],
),
trimMode: TrimMode.Line,
trimLines: 2,
colorClickableText: Colors.pink,
trimCollapsedText: '...Read more',
trimExpandedText: ' Less',
);
```

### 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.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: readmore
description: A Flutter package that allows for dynamic expansion and collapse of text, as well as interactions with text patterns such as hashtags, URLs, and mentions.
version: 3.0.0
version: 3.1.0
homepage: https://github.com/jonataslaw/loadmore

environment:
Expand Down

0 comments on commit 630764c

Please sign in to comment.