Flutter package to show url preview
This shows url preview of a URL.
Currently only supports Open Graph Protocol
Please use latest version of the package.
Add simple_url_preview to pubspec.yaml, and hit command 'flutter pub get'
dependencies:
...
simple_url_preview: ^1.0.0
SimpleUrlPreview(
url: 'https://pub.dev/',
),
SimpleUrlPreview(
url: 'https://pub.dev/',
previewHeight: 200,
previewContainerPadding: EdgeInsets.all(10),
),
Default textColor = Theme.of(context).accentColor
Default bgColor = Theme.of(context).primaryColor
SimpleUrlPreview(
url: 'https://pub.dev/',
textColor: Colors.white,
bgColor: Colors.red,
),
SimpleUrlPreview(
url: 'https://pub.dev/',
isClosable: true,
),
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.
If you liked my work, show some ❤️ by ⭐ repo.
Also you can appreciate by