html_to_image 1.0.0+1 copy "html_to_image: ^1.0.0+1" to clipboard
html_to_image: ^1.0.0+1 copied to clipboard

Flutter plugin to convert HTML file to image on Android and iOS using WebView on Android and WkWebView on iOS.

html_to_image #

Flutter plugin to convert HTML file to image on Android and iOS using WebView.

Requirements #

  • Android: Minimum SDK Version 21
  • iOS: Minimum Deployment Target 11.0

Usage #

Convert to Image from HTML content #

  • Future<Uint8List> convertToImage(String content, Duration delay,int? width)
final imageBytes = await HtmlToImage.convertToImage(
  content: content,
);
final image = Image.memory(imageBytes);

Convert to Image from HTML asset #

  • Future<Uint8List> convertToImageFromAsset(String asset, Duration delay,int? width)
final imageBytes = await HtmlToImage.convertToImageFromAsset(
  asset: 'assets/example.html',
);
final image = Image.memory(imageBytes);
  • Default delay is 200 milliseconds
  • Default width is device width
1
likes
160
points
6
downloads
screenshot

Publisher

verified publisherkedark.com.np

Weekly Downloads

Flutter plugin to convert HTML file to image on Android and iOS using WebView on Android and WkWebView on iOS.

Homepage
Repository (GitHub)
View/report issues

Topics

#html #html-to-image #html-print

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on html_to_image