The neplox_linkpreviewer package is a Flutter package that allows you to fetch metadata from a URL link and provides a link preview. It also allows users to customize the link preview and fetched metadata to implement them in their own Widgets.


Add neplox_linkpreviewer as a dependency in your pubspec.yaml file:

  neplox_linkpreviewer: 1.0.4


To fetch a link preview from a URL, you can use the NeploxLinkPreviewer widget:

class LinkPreviewer extends StatefulWidget {
  const LinkPreviewer({Key? key, required this.url});
  final String url;

  _LinkPreviewerState createState() => _LinkPreviewerState();

class _LinkPreviewerState extends State<LinkPreviewer> {
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.all(10.0),
      child: NeploxLinkPreviewer(
        url: widget.url,
        linkPreviewOptions: NLinkPreviewOptions(
          urlLaunch: NURLLaunch.enable,
          urlLaunchIn: NURLLaunchIn.browser,
          thumbnailPreviewDirection: NThumbnailPreviewDirection.bottom,

In the above example, the NeploxLinkPreviewer widget is used to fetch and display the link preview for the specified url. You can customize the link preview options by providing a NLinkPreviewOptions object.

To fetch metadata for your own Widget, you can use the NeploxMetaDataFetcher:

class ExampleMetaFetcher extends StatefulWidget {
  const ExampleMetaFetcher({Key? key});

  _ExampleMetaFetcherState createState() => _ExampleMetaFetcherState();

class _ExampleMetaFetcherState extends State<ExampleMetaFetcher> {
  final NeploxMetaDataFetcher _metaDataFetcher = NeploxMetaDataFetcher.instance;

  Widget build(BuildContext context) {
    return FutureBuilder<ElementModel>(
      future: _metaDataFetcher.fetchData(
      builder: (context, snapshot) {
        if (snapshot.hasData) {
          return Text( ?? "No Title");
        } else {
          return const Text("No data");

In the above example, the NeploxMetaDataFetcher is used to fetch metadata for the specified URL. The fetched data can be used to implement your own Widget. The fetchData method returns a Future that resolves to an ElementModel object containing the fetched metadata.


For more details and advanced usage, please refer to the API documentation.


This package is released under the MIT License.