flutter_autolink_text 1.0.0 copy "flutter_autolink_text: ^1.0.0" to clipboard
flutter_autolink_text: ^1.0.0 copied to clipboard

outdated

Flutter Autolink Text Widget.

flutter_autolink_text #

Text widget, that turns URLs, email and phone numbers into clickable inline links in text for flutter

Install #

Install by adding this package to your pubspec.yaml:

dependencies:
  flutter_autolink_text: ^1.0.0

Usage #

Basic: #

import 'package:flutter_autolink_text/flutter_autolink_text.dart';

AutolinkText(
	text: 'Your text with link www.example.com',
	textStyle: TextStyle(color: Colors.black),
	linkStyle: TextStyle(color: Colors.blue),
	onWebLinkTap: (link) => print('Clicked: ${link}')
);

To add autolink to emails and phone numbers:

import 'package:flutter_autolink_text/flutter_autolink_text.dart';

AutolinkText(
	text: ...,
	textStyle: TextStyle(color: Colors.black),
	linkStyle: TextStyle(color: Colors.blue),
	onWebLinkTap: (link) => print('Clicked: ${link}'),
	onEmailTap: (link) => print('Clicked: ${link}'),
	onPhoneTap: (link) => print('Clicked: ${link}')
);

Humanizing: #

Remove http:// or https:// from the start of the URL using humanize:

import 'package:flutter_autolink_text/flutter_autolink_text.dart';

AutolinkText(
	text: 'Link is https://example.com',
	humanize: true,
	...
);
2
likes
20
pub points
68%
popularity

Publisher

unverified uploader

Flutter Autolink Text Widget.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_autolink_text