Skip to content
pubscout

formatted_text

4.0.1, released 3 years ago by nirmalcode.com

A simple text formatting package for TextField and Text widgets.

WASM-ready
$ flutter pub add formatted_text
Source repository

What it does

Allows formatting text in Text and TextField widgets using pattern wrappers like bold, italic, strikethrough, underline, and custom patterns. Supports multi-styling substrings and provides custom text editing controllers and context menu builders.

AI-written summary of version 4.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need inline markdown-like text formatting within Text widgets.
  • You want a custom text editing controller that handles formatted text in TextFields.

Skip it when

  • You need full Markdown rendering with headers, lists, and links.
  • You require complex rich text document models.

Strengths

  • Supports multi-styling substrings.
  • Includes custom text editing controller and context menu builders.
  • Easy to add custom formatters.

Weaknesses

  • All formatter patterns must be distinctive.
  • Requires all TextStyles to be mergeable together.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Not documented

FormattedText('*This text is bold*');

Alternatives

Packages that do the same job and could replace formatted_text.

Works with

Packages commonly used together with formatted_text: ones it builds on, ones built on it, and its own family.