textf
2.0.2, released today by philippgerber.li
Drop-in Text and TextEditingController replacements for inline Markdown-like text formatting
What it does
Provides Textf and TextfEditingController widgets that support inline Markdown formatting like bold, italic, code, links, highlights, and super/subscripts directly in Flutter text layouts and text fields.
AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need inline markdown formatting in chat messages, comments, or UI labels
- You want live formatting updates as users type in a TextField
Skip it when
- You need a full Markdown renderer supporting multi-line structures like lists, tables, or blockquotes
- You need deep nesting beyond 2 levels
Strengths
- Zero dependencies
- Drop-in replacements for standard Text and TextEditingController widgets
- Supports live formatting in text fields as the user types
Weaknesses
- Inline-first with limited block support (only ATX headings and thematic breaks)
- Maximum of 2 nesting levels of formatting
- Selections cannot span across links due to WidgetSpan usage
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
not documented
import 'package:flutter/material.dart';
import 'package:textf/textf.dart';
class MyWidget extends StatelessWidget {
final _controller = TextfEditingController();
@override
Widget build(BuildContext context) {
return Column(
children: [
Textf(
'**Bold**, *italic*, `code`, and [links](https://flutter.dev)',
style: TextStyle(fontSize: 16),
),
TextField(controller: _controller),
],
);
}
}Alternatives
Packages that do the same job and could replace textf.
- re_editor
A lightweight text and code editor widget for Flutter with syntax highlighting and folding.
80Compare - gpt_markdown
Powerful Flutter Markdown and LaTeX renderer built for AI streaming outputs.
94Compare - super_text_layout
Configurable and extensible text display for custom decorations in Flutter.
88Compare - flutter_link_previewer
Customizable Flutter widget to fetch and render URL link previews.
91Compare