link_previewer 1.2.1

Flutter Android iOS web

A new Flutter package. It is build for making link looks prettier than just inline link or default hyperlink.

link_previewer #

A new Flutter package. Build container with image, title, description from web-site (link) will be provided.

Getting Started #

alt text

Installing #

Use this package as a library

  1. Depend on it

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

dependencies:
  link_previewer: ^1.2.1
  1. Install it

You can install packages from the command line: with Flutter:

$ flutter pub get

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

  1. Import it

Now in your Dart code, you can use:

import 'package:link_previewer/link_previewer.dart';

Usage #

Widget build() {
  return Column(
    mainAxisAlignment: MainAxisAlignment.center,
    children: <Widget>[
      LinkPreviewer(
        link: "https://www.linkedin.com/feed/",
        direction: ContentDirection.horizontal,
      ),
      LinkPreviewer(
        link: "https://www.linkedin.com/feed/",
        direction: ContentDirection.vertical,
      ),
    ],
  );
}

Properties (Constructor props) #

PropNameValueDefinition
linkString value (Ex: "http://...")Link to website will be shown as LinkPreviewer
titleFontSizedouble (default: 15, but it's auto resizable depends on layout(parent) width or hight)Title font size
bodyFontSizedouble (default: 14, but it's auto resizable depends on layout(parent) width or hight)Body font size
backgroundColorColor (default: Colors.white)Background color in case there will be not much text and will be whitespace
borderColorColor (default: Colors.deepOrangeAccent)Border color of the previewer
borderRadiusdouble (default: 3.0)Border radius
directionContentDirection from the package (default: ContentDirection.horizontal) Options: 1. ContentDirection.horizontal 2. ContentDirection.verticalContent direction (image -> title -> body)

From version 1.1.0

PropNameValueDefinition
placeholderWidgetCustom placeholder while data is loading
defaultPlaceholderColorColor (default: light-grey)If placeholder is not set, will be used the default one and its color can be set using this prop (empty container with background)
showTitlebool (default: true)Title can be hiden using this prop, if it set to false
showBodybool (default: true)Body can be hiden using this prop, if it set to false

From version 1.2.0

PropNameValueDefinition
bodyTextOverflowTextOverflow (default: TextOverflow.ellipsis or TextOverflow.fade)Text overflow prop
bodyMaxLinesint (default: depends on hight)Max Lines that will be shown in the body
3
likes
100
pub points
80%
popularity

A new Flutter package. It is build for making link looks prettier than just inline link or default hyperlink.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

dlapteacru.intern@gmail.com

License

BSD (LICENSE)

Dependencies

async, flutter, html, http, url_launcher

More

Packages that depend on link_previewer