simple_url_preview 1.1.1 copy "simple_url_preview: ^1.1.1" to clipboard
simple_url_preview: ^1.1.1 copied to clipboard

outdated

Flutter package to show url preview. Custamizable height, background and text colors, as well as lines.

simple_url_preview #

likes pub points popularity

Flutter package to show url preview

In Action

Getting Started #

This shows url preview of a URL.

Currently only supports Open Graph Protocol

Please use latest version of the package.

How to use ? #

Add simple_url_preview to pubspec.yaml, and hit command 'flutter pub get'

dependencies:
  ...
  simple_url_preview: ^1.1.1

1) Simple use:

SimpleUrlPreview(
  url: 'https://pub.dev/',
),

2) Override preview height, padding.(Default and minimum possible height is 130):

SimpleUrlPreview(
  url: 'https://pub.dev/',
  previewHeight: 200,
  previewContainerPadding: EdgeInsets.all(10),
),

3) Override text color and background color:

Default textColor = Theme.of(context).accentColor

Default bgColor = Theme.of(context).primaryColor

SimpleUrlPreview(
  url: 'https://pub.dev/',
  textColor: Colors.white,
  bgColor: Colors.red,
),

4) If you want closable preview (Click on x to close the preview.):

SimpleUrlPreview(
  url: 'https://pub.dev/',
  isClosable: true,
),

5) Override image loader color and title and description lines:

Default and maximum title lines = 2 and description lines = 3.

SimpleUrlPreview(
  url: 'https://pub.dev/',
  titleLines: 1,
  descriptionLines: 2,
  imageLoaderColor: Colors.white,
),

6) Override onTap callback of the URL preview:

By Default, will open URL in default browser.

SimpleUrlPreview(
  url: 'https://pub.dev/',
  onTap: () => print('Hello Flutter URL Preview'),
),

Contribution: #

Would ❤️ to see any contributions.

Appreciate: #

If you liked my work, show some ❤️ by ⭐ repo.

Also you can appreciate by

Buy Me A Coffee PayPal Logo

75
likes
40
pub points
85%
popularity

Publisher

unverified uploader

Flutter package to show url preview. Custamizable height, background and text colors, as well as lines.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

cached_network_image, flutter, flutter_cache_store, html, string_validator, url_launcher

More

Packages that depend on simple_url_preview