Search packages, repositories and app categories

linkify_text cover
Package detailsv0.0.9

linkify_text

LinkifyText is a Text widget that highlight all the links in the text. It further navigates user to the link using browser on tapping on highlighted link.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
332
Likes
22
Pub points
135

Install package

flutter pub add linkify_text

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

LinkifyText is a Flutter widget that automatically detects and highlights URLs within plain text, turning them into clickable links. When tapped, it opens the link in the default browser on supported platforms. Designed for rich text display, it enhances user experience by enabling seamless navigation from text content. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it versatile for cross-platform applications. It integrates easily with existing text rendering workflows.

Use cases

  • Displaying user-generated content with clickable links
  • Creating rich text descriptions with auto-linked URLs
  • Enhancing chat or comment sections with interactive links
  • Building documentation or help screens with navigable references
  • Integrating external resources directly from text

Key features

  • Automatic URL detection and highlighting
  • Tap-to-open links in default browser
  • Cross-platform compatibility
  • Simple integration with existing Text widgets
  • Supports all major desktop and mobile platforms

Suitable for

  • Apps needing rich text with clickable links
  • Social media or messaging interfaces
  • Documentation or knowledge base apps
  • Content-heavy applications with user input
  • Developers seeking minimal setup for link handling

Considerations

  • Does not support custom link styling beyond basic highlighting
  • Limited to HTTP/HTTPS URL detection
  • No built-in support for email or phone number linking
  • Relies on platform's default browser for navigation
  • May require additional configuration for non-HTTP protocols

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

LinkifyText

LinkifyText Widget allows to highlight links in Text. It further allow navigation, link opening on browser, on tapping highlighted link.

Code Example

import 'package:flutter/material.dart';
import 'package:linkify_text/linkify_text.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(

        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(child:
        LinkifyText(

          //String literal that may contain link
          "Please visit google.com",

          //color for all non link text
          fontColor: Colors.black,

          //color to highlight link
          linkColor: Colors.blue,

          //font size
          fontSize: 20,

          //font weight of the text
          fontWeight: FontWeight.w500,

          //font family of the text
          fontFamily: "Roboto",

          //To enable navigation on tapping on highlighted link
          isLinkNavigationEnable: true,
        ),
      ),
    );
  }
}

Image

Screenshot_1582176175

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.