flexible_text 1.1.0%2B3

SDKflutter
Platformandroidioswindowslinuxmacosweb

Powerful and flexible solution to create dynamic, interactive and customizable text with widgets, allows to write a single text block to show anything you want.

FlexibleText

FlexibleText is a Flutter widget that allows you to seamlessly mix and match rich text segments and widgets within a single text block. Customize your text with different styles and gestures, and insert inline widgets using simple placeholders. This powerful and flexible solution makes it easy to create dynamic, interactive, and visually appealing text in your Flutter applications.

codecov


title

Features

  • Rich Text Segments: Use different styles and gestures for various parts of your text.
  • Inline Widgets: Easily insert widgets such as icons, images, or any other widget into your text.
  • Customizable Separators: Define your own separators for rich text and widget placeholders.
  • Text Alignment: Control how the text is aligned horizontally.
  • Overflow Handling: Specify how visual overflow should be managed.

Getting Started 🚀

Installation 🧑‍💻

dependencies:
  flexible_text: ^latest_version

Import the Package

import 'package:flexible_text/flexible_text.dart';

Customization Options 🎨

CategoryOptionDescription
TexttextThe base text, including placeholders for rich text and widgets.
styleDefault styling applied to the text.
textAlignAlignment of the text (e.g., left, center, right).
overflowHandling of text overflow (e.g., ellipsis, clip, wrap).
Rich TextrichStylesStyles applied to specific segments of rich text.
textRecognizersGesture recognizers (e.g., tap, long-press) for rich text segments.
richTextSeparatorCharacter used to delimit rich text sections within the main text.
WidgetswidgetsList of widgets embedded in the text.
namedWidgetsMap of named widgets for insertion into the text.
widgetAlignmentAlignment of inline widgets within the text flow.
widgetSeparatorCharacter used to mark widget placeholder positions in the text.

Contributing 👨

Contributions are welcome! Please feel free to submit a pull request or open an issue to improve the package.