flutter_ellipsis_text 1.1.0 copy "flutter_ellipsis_text: ^1.1.0" to clipboard
flutter_ellipsis_text: ^1.1.0 copied to clipboard

Expandable Flutter text with a custom ellipsis, responsive layout, text scaling, and right-to-left support.

flutter_ellipsis_text #

Expandable Flutter text with a custom ellipsis. Layout follows parent constraints, text scaling, and ambient text direction.

Installation #

Requires Flutter 3.32+ and Dart 3.8+.

flutter pub add flutter_ellipsis_text

Usage #

import 'package:flutter/material.dart';
import 'package:flutter_ellipsis_text/flutter_ellipsis_text.dart';

const EllipsisText(
  text: 'A long description that can be expanded by tapping it.',
  ellipsis: '… more',
  maxLines: 2,
  style: TextStyle(fontSize: 16),
)

Place the widget below a Material widget (for example, in a Scaffold). Give it a bounded width with a SizedBox or Expanded when you want wrapping.

  • Tap overflowing text to expand or collapse.
  • Set isShowMore: false to display noninteractive, truncated text.
  • Set startScaleIsSmall: false to start expanded.
  • Set textDirection to override the ambient direction.
  • minWidth and maxWidth are preferred constraints; tighter parent constraints win.

The full text remains available to screen readers when collapsed.

Expand and collapse example

Development #

flutter pub get
dart format --output=none --set-exit-if-changed lib example test
flutter analyze --fatal-infos
flutter test
flutter pub publish --dry-run

CI checks the minimum supported Flutter version and the latest stable channel.

Migration #

This release requires Dart 3.8 and Flutter 3.32 or newer. Existing constructor and method arguments remain supported. See CHANGELOG.md for fixes.

License #

MIT. See LICENSE.

3
likes
160
points
152
downloads

Documentation

API reference

Publisher

verified publishertyrannoapartment.com

Weekly Downloads

Expandable Flutter text with a custom ellipsis, responsive layout, text scaling, and right-to-left support.

Repository (GitHub)
View/report issues

Topics

#flutter #widget #text

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_ellipsis_text