Show preview of urls, designed to show list of url previews with caching support.
Forked from flutter-simple-url-preview with different caching strategy for fast retrivel, and additional styling options.
Show single or list of URL previews
Currently only supports Open Graph Protocol
Please use latest version of the package.
Add url_preview_card to pubspec.yaml, and hit command 'flutter pub get'
dependencies:
...
url_preview_card: ^0.1.1
SimpleUrlPreview(
url: 'https://pub.dev/',
),
SimpleUrlPreview(
url: 'https://pub.dev/',
previewHeight: 200,
previewContainerPadding: EdgeInsets.all(10),
),
Default titleStyle = TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Colors.black
);
Default descriptionStyle = TextStyle(
fontSize: 14,
color: Colors.black
);
Default siteNameStyle = TextStyle(
fontSize: 14,
color: Colors.black
);
SimpleUrlPreview(
url: 'https://pub.dev/',
titleStyle: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16,
fontFamily: 'Sansita Swashed'
),
descriptionStyle: TextStyle(
color: Colors.white
),
siteNameStyle: TextStyle(
color: Colors.white
),
),
Default and maximum title lines = 2 and description lines = 3.
SimpleUrlPreview(
url: 'https://pub.dev/',
titleLines: 1,
descriptionLines: 2,
imageLoaderColor: Colors.white,
),
By Default, will open URL in default browser.
SimpleUrlPreview(
url: 'https://pub.dev/',
onTap: () => print('Hello Flutter URL Preview'),
),
Would ❤️ to see any contributions.