linkify
5.0.0, released 4 years ago by cretezy.com
Low-level Dart library that parses text into URLs, emails, phone numbers and user tags.
WASM-ready
What it does
The package scans a string and returns a list of elements representing plain text and detected links. It supports options to humanize URLs, remove www, and enable loose URL parsing. Custom linkifiers can be added for additional patterns.
AI-written summary of version 5.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to extract or transform links from plain text in a Dart or Flutter app
- You want a lightweight, dependency‑free solution for link detection without UI widgets
Skip it when
- You need ready‑made clickable link widgets (use flutter_linkify instead)
- You require advanced parsing features like HTML or markdown handling
Strengths
- Zero external dependencies
- Null‑safety and Dart 3 support
- Highly customizable via options and custom linkifiers
Weaknesses
- Only provides parsing, no UI components
- Limited to predefined link types unless you write custom linkifiers
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:linkify/linkify.dart';
void main() {
final result = linkify('Contact me at user@example.com or visit https://example.com');
print(result);
}Alternatives
Packages that do the same job and could replace linkify.
- petitparser
A generic parsing library that can be used to build custom link parsers if you need more control or additional formats
93Compare
Works with
Packages commonly used together with linkify: ones it builds on, ones built on it, and its own family.