Skip to content
pubscout

smart_text_flutter

0.4.0, released 2 months ago by developerjamiu.com

Detects and highlights links in text using platform native APIs.

$ flutter pub add smart_text_flutter
Source repository

What it does

A Flutter plugin that uses NSDataDetector on iOS and TextClassifier on Android to automatically find and classify links in plain text (such as addresses, phone numbers, emails, dates/times, and URLs). It provides custom widgets like SmartText to render these links with custom configurations.

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

Use it when

  • You need to automatically linkify addresses, phone numbers, emails, dates, and URLs in plain text.
  • You want native link detection performance via NSDataDetector and TextClassifier.

Skip it when

  • You need dateTime support on Android (not supported).
  • You need address support on Android 8.1 (API 27) and below.

Strengths

  • Uses platform-native text classification APIs.
  • Supports customizable text styles and click handlers for each link type.
  • Provides both SmartText and SmartSelectableText widgets.

Weaknesses

  • Some features like DateTime are unsupported on Android.
  • Minimum iOS version requirement is 13.0.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3

Requires minimum iOS 13.0 and Android SDK 19+.

SmartText(
  'Here is a text with an address: 36 Lagos Street written at 9 PM by someone with phone: +2340000000000 and you can reach him at reaching@email.com or you can check twitter.com',
)

Alternatives

Packages that do the same job and could replace smart_text_flutter.

Works with

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