Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Easy to use text widget for Flutter app

Link Text

Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links. Allows for custom styling.

Usage

Link Text widget requires no setup. Just simply pass a String with inlined URLs, and the widget will take care of the rest.

final String _text = 'Lorem ipsum https://flutter.dev\nhttps://pub.dev';

@override
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(
      child: LinkText(
        text: _text,
        textAlign: TextAlign.center,
      ),
    ),
  );
}

Installation

Add to pubspec.yaml:

dependencies:
  link_text: ^0.1.2

For more info, check out example project.

Download Flutter Link Text Widget source code on GitHub

Exit mobile version