neplox_linkpreviewer 1.0.6 copy "neplox_linkpreviewer: ^1.0.6" to clipboard
neplox_linkpreviewer: ^1.0.6 copied to clipboard

LinkPreviewer Package to show Normal URL link elements and it also provide Element object for custom UI implementation.

neplox_linkpreviewer #

pub package

A Flutter package for fetching and displaying rich link previews with customizable styling and behavior.

Features #

  • Automatic Metadata Extraction: Easily fetch title, description, images, and icons from URLs.
  • Built-in Preview Widget: NeploxLinkPreviewer provides a pre-styled link preview.
  • Customizable:
    • Control thumbnail positioning (NThumbnailPreviewDirection).
    • Style text and background colors.
    • Choose whether to launch URLs in-app or in an external browser (NURLLaunch, NURLLaunchIn).
  • Flexible Metadata Access: Use NeploxMetaDataFetcher to get metadata for your own custom UI implementations.
  • Caching: Improves performance by caching fetched metadata.
  • Extensible: Supports custom widget builders for full control over the preview layout.
  • Error Handling: Gracefully handles invalid URLs and network issues.

Installation #

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

dependencies:
  neplox_linkpreviewer: ^1.0.6

Usage #

1. Using the Built-in Preview Widget #

NeploxLinkPreviewer(
  url: '[https://example.com](https://example.com)',
  linkPreviewOptions: NLinkPreviewOptions(
    thumbnailPreviewDirection: NThumbnailPreviewDirection.bottom, 
    urlLaunch: NURLLaunch.enable,
    urlLaunchIn: NURLLaunchIn.browser,  // Or NURLLaunchIn.app
  ),
  // Customize styles here (titleColor, subtitleColor, etc.)
)

2. Fetching Meta Data For Custom Widgets #

final metaDataFetcher = NeploxMetaDataFetcher.instance;
final elementModel = await metaDataFetcher.fetchData('[https://example.com](https://example.com)');

// Use elementModel.title, elementModel.description, etc. to build your own UI.
12
likes
150
pub points
70%
popularity

Publisher

verified publishershobhit.com.np

LinkPreviewer Package to show Normal URL link elements and it also provide Element object for custom UI implementation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cached_network_image, flutter, html, http, shared_preferences, url_launcher

More

Packages that depend on neplox_linkpreviewer