this is auto generated from API :)
Go to file
iamstanlee e71d8c3383 updated readme 2021-06-03 21:35:39 -07:00
example fix pub warnings 2021-06-03 20:33:01 -07:00
lib fix pub warnings 2021-06-03 20:33:01 -07:00
test changed pkg name to linkfy_text 2021-06-03 20:16:21 -07:00
.gitignore initial commit 2021-06-03 13:00:21 -07:00
.metadata initial commit 2021-06-03 13:00:21 -07:00
CHANGELOG.md fix pub warnings 2021-06-03 20:31:39 -07:00
LICENSE initial commit 2021-06-03 13:00:21 -07:00
README.md updated readme 2021-06-03 21:35:39 -07:00
pubspec.lock initial commit 2021-06-03 13:00:21 -07:00
pubspec.yaml fix pub warnings 2021-06-03 20:31:39 -07:00

README.md

A lightweight flutter package to linkify texts containing urls, emails and hashtags.

Using

// first import the package
import 'package:linkfy_text/linkify_text.dart';
LinkifyText(
    "This text contains a url: https://flutter.dev",
    linkStyle: TextStyle(color: Colors.blue, fontSize: 16),
    onTap: (link) {
        // onTap is called when a link is pressed
        print("${link.value}");
    },
);

Be default, The above snippet would linkify all urls in the string, you can choose whatxw type of link to linkify by passing the linkTypes parameter

LinkifyText(
        "This text contains an #hashtag",
        linkStyle: TextStyle(color: Colors.blue, fontSize: 16),
        linkTypes: [LinkType.hashtag]
        onTap: (link) {
            print("${link.value}");
        },
    );