flutter_link_previewer 2.0.8 copy "flutter_link_previewer: ^2.0.8" to clipboard
flutter_link_previewer: ^2.0.8 copied to clipboard

outdated

URL preview extracted from the provided text with basic customization and ability to render from cached data.

Flutter Link Previewer #

Pub build CodeFactor

URL preview extracted from the provided text with basic customization and ability to render from cached data.

Getting Started #

import 'package:flutter_link_previewer/flutter_link_previewer.dart';

LinkPreview(
  enableAnimation: true,
  onPreviewDataFetched: (data) {
    setState(() {
      // Save preview data to the state              
    });
  },
  previewData: _previewData, // Pass the preview data from the state
  text: 'https://flyer.chat',
  width: MediaQuery.of(context).size.width,
)

Customization #

final style = TextStyle(
  color: Colors.red,
  fontSize: 16,
  fontWeight: FontWeight.w500,
  height: 1.375,
);


LinkPreview(
  linkStyle: style,
  metadataTextStyle: style.copyWith(
    fontSize: 14,
    fontWeight: FontWeight.w400,
  ),
  metadataTitleStyle: style.copyWith(
    fontWeight: FontWeight.w800,
  ),
  padding: EdgeInsets.symmetric(
    horizontal: 24,
    vertical: 16,
  ),
  onPreviewDataFetched: _onPreviewDataFetched,
  previewData: _previewData,
  text: 'https://flyer.chat',
  textStyle: style,
  width: width,
);

License #

MIT

294
likes
0
pub points
96%
popularity

Publisher

verified publisherflyer.chat

URL preview extracted from the provided text with basic customization and ability to render from cached data.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_chat_types, flutter_linkify, html, http, linkify, meta, url_launcher

More

Packages that depend on flutter_link_previewer