flutter_linkify 1.0.3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 90

flutter_linkify pub package

Turns text URLs into clickable inline links in text for Flutter.

Pub - API Docs - GitHub

Install

Install by adding this package to your pubspec.yaml:

dependencies:
  flutter_linkify: 1.0.3

It is highly recommend that you also add a dependency on url_launcher to open links in the browser.

Usage

Basic:

import 'package:flutter_linkify/flutter_linkify.dart';

Linkify(
  onOpen: (url) => print("Clicked $url!"),
  text: "Made by https://cretezy.com",
);

Add a style to non-links (yellow) or links (red), and open in browser using url_launcher:

import 'package:flutter_linkify/flutter_linkify.dart';
import 'package:url_launcher/url_launcher.dart';

Linkify(
  onOpen: (url) async {
    if (await canLaunch(url)) {
        await launch(url);
      } else {
        throw 'Could not launch $url';
      }
  },
  text: "Made by https://cretezy.com",
  style: TextStyle(color: Colors.yellow),
  linkStyle: TextStyle(color: Colors.red),
);

Full example can be found at example/lib/main.dart.

Example Screenshot

[1.0.3] - 2018-11-06

[1.0.2] - 2018-11-05

[1.0.1] - 2018-09-15

  • Add more documentation.

[1.0.0+1] - 2018-09-15

  • Update description.

[1.0.0] - 2018-09-15

  • Initial release.

example/README.md

example

A new Flutter project.

Getting Started

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_linkify: ^1.0.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_linkify/flutter_linkify.dart';
  
Version Uploaded Documentation Archive
1.0.3 Nov 7, 2018 Go to the documentation of flutter_linkify 1.0.3 Download flutter_linkify 1.0.3 archive
1.0.2 Nov 5, 2018 Go to the documentation of flutter_linkify 1.0.2 Download flutter_linkify 1.0.2 archive
1.0.1 Sep 15, 2018 Go to the documentation of flutter_linkify 1.0.1 Download flutter_linkify 1.0.1 archive
1.0.0+1 Sep 15, 2018 Go to the documentation of flutter_linkify 1.0.0+1 Download flutter_linkify 1.0.0+1 archive
1.0.0 Sep 15, 2018 Go to the documentation of flutter_linkify 1.0.0 Download flutter_linkify 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
81
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8